Anatomy of a Tool Call
Every tool-calling system has the same four moving parts.
| Part | What It Is | Who Controls It |
|---|---|---|
| Tool Schema | JSON description you give the model: name, what it does, what arguments it takes. The model never gets your code | Developer (you define it) |
| tool_use block | What the model emits when it wants to call a tool. Just structured text the model generated | LLM (it generates this) |
| Execution Layer | Your code that reads tool_use, dispatches to real implementation, attaches auth, handles errors | Developer (your orchestrator) |
| tool_result block | Structured message you send back so the model can read the outcome and decide next steps | Developer (you format this) |
Complete Tool Call Data Flow
Continue Reading
This topic continues with more in-depth content, code examples, and diagrams. Sign up free to unlock the full guide with all 87 sections.
Sign Up Free to UnlockFree access · No credit card required
More in LLM & Agentic
LLM Lifecycle
PreviewComplete lifecycle of large language models from pre-training through fine-tuning, RLHF, and deployment — with architecture diagrams and production considerations.
Fine-Tuning Framework
PreviewWhen and how to fine-tune LLMs: LoRA, QLoRA, full fine-tuning decision framework with cost analysis and real-world examples.
How LLMs Call Tools
PreviewHow LLMs use function calling and tool use — the mechanics behind tool-calling agents, from prompt engineering to structured output.
Stateless vs Stateful
PreviewStateless vs stateful LLM architectures: trade-offs for agent design, conversation management, and production deployment.
Get full access to all 87 sections with code examples, diagrams, and interactive animations.
Sign Up Free