Designing tools an LLM can use
Designing tools an LLM can use
The model never sees your function. It sees three strings: a name, a description, and a JSON Schema of the arguments. From those alone it has to decide whether this tool is the right one, what to pass, and what to do with what comes back. Every tool-calling mistake you will debug traces back to one of those three things being unclear, or to a result the model could not act on.
That reframes tool design as API design for a very particular client: one that reads fast, takes descriptions literally, cannot ask you what you meant, and has to guess from the name when the description is vague. The rules below all follow from that.
Continue reading
Pro unlocks every video lesson, the full notes and runnable code across the Python with AI course, from the language itself to agents, MCP, Langfuse and deployment.