What is an AI tool definition?

A tool definition is a machine-readable description of a tool offered to a model or agent: its name, what it does, an input schema of parameters and types and, where needed, an output schema, often written in JSON Schema.

Unlike tool calling (the model using the tool with specific arguments), the definition describes what the tool is and how to call it. Tool choice sets how freely the model may pick among these definitions.

Topic
Agents and protocols
Also known as
Tool schema, function definition

How an AI tool definition works

  1. The tool gets a short unique name and a description stating clearly when to use it.
  2. The input schema gives each parameter's name, type, description and whether it is required; an output schema is added if needed.
  3. Definitions go into the model's context; it reads them to decide which tool to call and how.
  4. The runtime validates the model's arguments against the schema, runs the tool and returns the result to the model.

In more detail

Context cost, tool bloat and dynamic tool discovery

Every tool definition consumes input tokens on every turn. When an agent connects to dozens of servers or hundreds of tools, bloated schemas waste context window capacity, raise latency and degrade selection accuracy. Production systems address this with tool search or deferred tool loading, injecting only relevant tool definitions dynamically per task.

Behavioural annotations and strict JSON Schema constraints

Modern tool protocols also attach behavioural annotations (such as MCP's `readOnlyHint`, `destructiveHint`, `idempotentHint` and `openWorldHint`) so client UIs and policy gateways can decide whether a call needs human confirmation. In addition, strict schema modes (`strict: true`) used by many inference engines restrict JSON Schema features, often requiring `additionalProperties: false` and disallowing arbitrary `oneOf` or regex constraints.

Actionable error contracts and self-correction

Well-designed tool definitions also specify how validation or execution errors are returned to the model (for example, MCP's `isError` flag with actionable corrective guidance). Returning clear schema-mismatch hints lets the agent self-correct arguments on the next turn without exposing raw stack traces or internal system details.

Commonly confused terms

TermHow it differs
Structured outputsStructured outputs (`response_format`) constrain the model's final user-facing assistant text to follow a JSON Schema; tool definitions expose callable external capabilities whose execution results are fed back into the agent loop.

Why an AI tool definition matters for on-premises AI

Whether an agent calls the right tool with the right arguments depends largely on clear descriptions; vague or overlapping ones cause wrong tool choices. As doors into in-house systems they matter for security too: they stay narrow, arguments are validated server-side and external definitions are reviewed first, since instructions hidden in descriptions can steer the model. Definitions are versioned with changes logged.

ON-PREMISES EXAMPLE

A bank defines a read-only account statement tool for its in-house agent; the description says when to use it, the schema requires customer number and date range and the runtime checks the user's permissions on every call.

Common questions

How is a good tool definition written?

The name is short and unique; the description says clearly when to use the tool. Parameters are defined in the schema with their types and whether they are required.

Do tool definitions carry security risks?

They can. Instructions hidden in external definitions' descriptions can steer the model, so definitions are reviewed and arguments validated server-side.

Sources

In the glossary: Glossary, R to Z

What does this term mean for your infrastructure?

We can work out together in a technical assessment how it maps onto your data, hardware and security requirements.

Request a technical assessment →

This site sets no cookies. Visitor numbers are counted in aggregate using a cookieless method that does not identify anyone. See the Privacy Policy for details.