Tools are part of the prompt
Exposing a tool is a kind of instruction: it tells the model 'here is something you can do.' The model decides whether to call the tool, with what arguments, and how to integrate the result into its response. Most tool-calling bugs are prompt bugs — the tool's name, description, and input schema are doing the work.
What the model reads
- Tool name — should be a verb or verb-noun (
search_documents,create_ticket). - Description — short, says what the tool does and when to use it. The most under-written field; treat it like a small prompt.
- Input schema — JSON Schema. Field descriptions are visible to the model.
- Examples — some providers support example tool calls. Use them for non-obvious tools.
Common mistakes
- One-line descriptions that don't say when to use the tool.
- Overlapping tools that compete (two ways to do the same thing).
- Generic field names without descriptions (
id,data). - No guidance on what to do when the tool returns an error.