Example: Adding a Calculator to Our Agent › Glossary
AI Agent HandbookAll chapters Example: Adding a Calculator to Our Agent › GlossaryOne section · Sections in this chapter15 / 16 ↓
Tool Registry: A dictionary or mapping that connects tool names to their actual Python function implementations, allowing the agent to look up and call tools dynamically.
Tool Use Block: The structured response from the language model indicating it wants to use a tool, including the tool name and the parameters to pass to it.
Stop Reason: A field in the model's response indicating why it stopped generating. A value of "tool_use" means the model wants to call a tool.
Tool Result: The output returned by a tool function after it executes, which is sent back to the agent so it can incorporate the information into its response.
Parameter Extraction: The process by which the agent identifies the necessary values from a user's question and formats them as inputs for a tool function.
Error Handling: The practice of catching and gracefully managing errors in tool execution, returning structured error information that the agent can communicate to the user.