Glossary · AGENT INFRASTRUCTURE

Tool use (function calling)

Tool use, also called function calling, is the mechanism by which a language model invokes external functions: the host application declares tools with typed schemas, the model emits a structured call with arguments, and the host executes it and returns the result into the model's context. It is how agents act — calling APIs, querying databases, running code — rather than only generating text.

Tool declarations have to come from somewhere, and for APIs they come from the machine-readable surface: OpenAPI operations map naturally onto tool definitions, and MCP servers declare their tools with JSON Schema-typed inputs. An API with a clean, parseable spec converts directly into tools an agent can call; an API documented only in prose forces the agent to reconstruct the schema by reading, with every misreading becoming a malformed call.

Correct tool use is downstream of comprehension. A model that misunderstands the documentation builds requests with wrong parameters, wrong endpoints, or capabilities the API never had — the hallucinated-integration failure that surfaces later as a support ticket blaming the API. The quality of what the agent read determines the quality of what it calls.

How Discry measures this

Discry's comprehension dimension measures the precondition for correct tool use: request-construction tasks quiz models on building correct requests from the API's fetched docs, graded mechanically against citation-verified ground truth, while trap tasks probe whether a model invents capabilities the API does not support. Each profile reports its request-task coverage.

What does an AI agent make of your API?

Find out in about a minute — no signup.

Discry your API — free