Notes

Tool Schema

Before an agent can use a tool, it has to be told the tool exists — and the only way it learns that is from a written declaration it reads as part of its prompt. A tool schema is that declaration: the tool's name, what it is for, and the exact shape of the arguments it accepts, written in a machine-readable form the model is trained to fill in.

What the schema contains

  • A name the model emits when it decides to call the tool.
  • A natural-language description — the part the model actually reasons over when choosing between tools.
  • A typed parameter list, usually JSON Schema: each argument's type, whether it is required, the allowed values, and often a per-argument description.

Why the wording is load-bearing
The schema is a contract in two directions: the runtime validates incoming arguments against it, and the model treats it as instructions. A parameter typed as a free-form string invites an invented date format; an enum constrains it to the three values the API will accept. A description that says "search" rather than "search the internal product catalogue by SKU; does not cover pricing" is how an agent ends up calling the wrong tool out of twenty, repeatedly, until its step budget runs out. This is why function calling APIs and the Model Context Protocol both standardise schemas instead of leaving tool definitions to prose — one well-written schema serves every client that speaks the protocol, and one vague schema degrades every agent that reads it.

A tool schema is the machine-readable declaration of a tool an agent may call: its name, a natural-language description of its purpose, and a typed parameter list — usually JSON Schema — stating each argument and whether it is required. It serves two roles at once: the model reads it to decide which tool fits and how to fill it in, and the runtime validates the emitted call against it before anything executes.

Think of a vending machine with a label on every button. The label tells you what you will get, and the slot tells you what to put in. A tool schema is that label, written for software.

An AI assistant that can book a meeting or look up a parcel does not magically know how. It is handed a short written form for each thing it is allowed to do: what the tool is for, and what information it needs — a date here, an email address there. The assistant reads the form, fills it in, and the surrounding software carries the request out. Write the label badly and it presses the wrong button.