ModelRefs / Tool Definition — AI Glossary

Tool Definition — AI Glossary

The formal specification of a callable function provided to the LLM in an API request, enabling structured tool use. Anthropic uses a similar structure.

Overview

Tool definitions in OpenAI format: an object with type='function', function.name, function.description (natural language—critical for selection), and function.parameters (JSON Schema). Anthropic uses a similar structure. The model emits tool_call objects referencing tool names with arguments when it decides to use a tool.

Reference details

Topicecosystem
Also known asfunction definition, tool spec
Last reviewed2026-06-24

Example: The description is prompt text, and it is not free

A tool definition is a name, a natural-language description and a JSON Schema for the parameters — and all of it is serialised into the request. Twenty tools averaging 80 tokens each is 1,600 tokens of context spent before the user's question is read, on every call. The description is also the only thing the model has when deciding which tool to reach for: two tools whose descriptions do not clearly separate their cases will be confused with each other no matter how good the model is. Selection accuracy is a writing problem before it is a model problem.

Commonly confused with

The definition is the contract sent in the request; the tool call is what the model emits against it; the execution is what your code does with that. The model never runs anything — it produces a structured request, and every permission and validation decision belongs on your side of that boundary.

When to use it

Reach for it when:

  • Any tool-calling integration — the schema is what makes the call parseable
  • Constraining inputs with enums and required fields, so invalid calls fail at the schema
  • Rewriting descriptions as a first fix when the model picks the wrong tool

Reach for something else when:

  • Attaching every available tool to every request — it costs context and hurts selection
  • Trusting arguments without validation: a schema-valid call can still be a wrong or hostile one
  • Overlapping tools with near-identical descriptions, which guarantees confusion

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Tool Definition — AI Glossary.

Frequently asked questions

What is Tool Definition?

The formal specification of a callable function provided to the LLM in an API request, enabling structured tool use.

Is Tool Definition the same as function definition?

Yes — function definition, tool spec are common aliases for Tool Definition.

What concepts are related to Tool Definition?

Closely related concepts include tool schema, tool use, tool selection.