tool dispatcher
The code that receives a model's tool call, checks the tool name and input, runs the matching function and builds the result.
In more detail
A dispatcher is the one place to enforce validation, permissions, timeouts and logging for every tool, and to turn exceptions into error results the model can read. Keep the mapping from tool names to functions in one table, so an unknown name is rejected rather than guessed.
Related terms
- tool call — A model's structured request to run one tool with given arguments, returned instead of, or alongside, text.
- tool result — The message your code sends back after running a tool call, matched to it by id, which the model reads before continuing.
- agent policy engine — Code outside the model that decides, for every proposed tool call, whether to allow it, deny it or ask a person, based on rules written as data.
Taught in
- Function Calling — AI Engineering: LLM Apps, RAG & Agents
- The Agent Loop — AI Engineering: LLM Apps, RAG & Agents
- Workflows Before Agents — AI Engineering: LLM Apps, RAG & Agents
- Planning, Memory And Many Agents — AI Engineering: LLM Apps, RAG & Agents
- Agent SDKs And Human Approval — AI Engineering: LLM Apps, RAG & Agents
- Build An MCP Server — AI Engineering: LLM Apps, RAG & Agents
- Connect An Agent To MCP — AI Engineering: LLM Apps, RAG & Agents