01Chapter 1: How a model sees and calls your toolsThis chapter assumes you have called an LLM API before, can read JSON, know the basic JSON Schema types (string, integer, object, array), and can read short Python examples.2 min read
03Chapter 3: Choosing clear, consistent tool namesThis chapter assumes you can read JSON and short Python examples, and that you have called an LLM API with tools at least once. The name is the first thing the model reads about a tool. It also appears in the model's output when the model calls the tool, so it has to be easy to read, easy to tell ap3 min read
04Chapter 4: Writing descriptions that say what, when, and when notThis chapter assumes you have called an LLM API with tools before, can read JSON, and know the basic JSON Schema types. The model sees only your tool's name, description, and schema. The description is the main signal it uses to decide whether to call a tool and when.2 min read
05Chapter 5: Defining parameters with JSON SchemaThis chapter assumes you can read JSON, know the basic JSON Schema types (string, integer, object, array), and have called an LLM API with a tool before. It covers the input_schema part of a tool definition.2 min read
06Chapter 6: Describing each parameter so the model fills it correctlyThis chapter assumes you can read JSON Schema basics (string, integer, object) and short Python examples. You should also know how a tool definition reaches the model during a tool-calling loop.2 min read
07Chapter 7: Using enums and constraints to rule out bad argumentsThis chapter assumes you can read JSON Schema types (string, integer, object, array) and short Python examples. You should also know how a model calls a tool: it reads your schema and produces arguments as JSON.2 min read
08Chapter 8: Deciding what is required and what is optionalThis chapter assumes you can read JSON Schema (type, properties, required) and short Python examples. It also assumes you have seen a tool definition with a name, description, and input schema.2 min read
09Chapter 9: Choosing how many tools and how much each doesThis chapter assumes you know the tool-calling loop and the parts of a tool definition (name, description, input schema). It covers how to decide where one tool ends and the next begins.2 min read
10Chapter 10: Keeping similar tools distinguishableThis chapter assumes you know how a tool definition is structured (name, description, input schema) and have read the chapters on naming, descriptions, and tool granularity. Here you will learn how to stop the model from picking the wrong tool when two tools look alike.2 min read
11Chapter 11: Adding examples and format hints to descriptionsThis chapter assumes you can read JSON Schema and short Python examples. You should also know how a tool definition is laid out: a name, a description, and an input schema.2 min read
12Chapter 12: Shaping tool results the model can useThis chapter assumes you know the tool-calling loop: the model requests a tool, your code runs it, and you send the result back as the next message. It also assumes you can read short Python and JSON. The tool result is the only information the model gets about what happened. Design it as carefully 2 min read
13Chapter 13: Returning errors the model can act onThis chapter assumes you know the tool-calling loop, can read a JSON Schema, and can read short Python examples. A tool will sometimes fail, because the model sent a bad ID, the record does not exist, or a backend timed out. What your tool returns at that moment decides whether the model recovers or2 min read
14Chapter 14: Managing the token cost of tools and resultsThis chapter assumes you know the tool-calling loop, how to write a tool definition (name, description, input schema), and how tool results flow back to the model. Here you will see where tool-related tokens go and how to reduce them without hurting tool selection.2 min read
15Chapter 15: Validating arguments before running the toolThis chapter assumes you can read short Python examples, work with JSON, and know basic JSON Schema types. It also assumes you have seen the tool-calling loop, where the model emits a tool call and your code runs it.2 min read
16Chapter 16: What differs between providers' schema supportThis chapter assumes you can read JSON Schema basics (string, integer, object, array) and short Python examples. It also assumes you have called an LLM API with tools at least once. The core ideas in this tutorial carry across providers: a name, a description, and a JSON Schema for the arguments. Th2 min read
17Chapter 17: Testing tool selection and refining definitionsThis chapter assumes you can call an LLM API with tools, read JSON Schema, and read short Python examples. You have already written names, descriptions, and schemas. Now you measure whether the model uses them correctly.2 min read