Function Calling Deep Dive: The Wire Under Tool Use

The mechanics beneath every agent framework: how you declare tools, what a structured tool call actually contains, why arguments are text you must parse and validate, how results get keyed back to a call id, and where the provider dialects differ.

Content current as of 2026-09.

Lessons

  1. The round trip: four messages and one correlation id
  2. The request side: schemas and tool choice
  3. The response side: parallel calls and a string you must parse
  4. Provider dialects: same concepts, different field names
  5. Streaming tool calls, and the validation ladder