MCP Tool Schema Design for Reliable Agent Calls
Clear names, strict types, and structured errors keep agents from guessing.

Reliable MCP tool calls depend on deliberate schema design. Names, descriptions, types, constraints, and error returns give an agent the context it needs to select a tool, construct valid arguments, and recover from failure.
Why MCP schema design is the decisive layer for agent reliability
The model never sees a tool’s source code. It sees the schema that the server publishes, so an implementation’s internal correctness cannot compensate for an ambiguous interface. When a schema presents twelve fields without descriptions, the model must infer their meaning and valid values from names alone. If required fields are also undeclared, it has no reliable signal about which arguments must be present. Hallucinated values and omitted fields are therefore interface failures.
A tool may silently return bad data that the model trusts, or throw an unstructured error that gives it no path to repair. In a multi-step workflow, either result becomes context for later decisions. Prompt changes may influence the model’s choices, but they do not supply the missing contract. Schema design belongs in the engineering work that defines valid behavior, rather than in documentation added after implementation.
How the model actually uses a schema to construct a tool call
The interaction begins when the client requests tools/list. The model receives the schema array and uses the tool’s name, description, and inputSchema to select an operation and construct its arguments. These fields have different jobs. The name signals intent, the description explains the tool’s purpose and selection conditions, and inputSchema defines the arguments available to fulfill that purpose.
The github_create_pr example makes that division concrete. Its name signals a pull-request creation operation on a code-hosting platform, but the name alone cannot explain when that operation fits the task or what inputs it accepts. The description supplies the selection context. Once the tool is selected, the model maps information from the conversation onto the properties in inputSchema, using each property’s type and description to infer a value. A property without a description leaves the model dependent on its name.
The description therefore acts as a prompt to the model. A feature-only description can leave similar tools indistinguishable, even when their argument schemas are precise. The same interpretive process continues after execution, when the model incorporates the result into its reasoning. An empty array or an unstructured exception leaves the model to decide what happened. That interpretation can become the premise of the next call.
Tool naming and description conventions that make selection unambiguous
Tool names and descriptions form a classification signal. Schema authors should use verb-plus-object names in either snake_case or camelCase, consistently across the server. Replacing customer with get_customer_record makes the intended operation visible before the model reads the description. A shared naming pattern also makes names useful for distinguishing operations across the tool roster. Mixing styles weakens that signal and shifts more of the selection burden onto descriptions.
Descriptions should explain both what the tool does and when to use it, targeting roughly 200–400 characters. The selection rule is the important addition. A feature-only description such as “returns a list of customers” gives the model little basis for choosing among related tools, whereas a clause such as “use this when you need to look up a customer by ID, not to search” establishes a boundary. The wording must match the actual operation, with lookup rules attached to lookup tools. Lookup, search, and list tools each need rules for when to use them, even when they work with the same resource.
Parameter descriptions need the same precision at a smaller scale. Each should explain what a valid value looks like and what happens when the wrong value is supplied. Selection still comes first. A perfectly typed tool can fail operationally if its description causes the model to call it at the wrong time or skip it when needed.
Typing and schema structure choices that eliminate argument hallucination
Once it is clear which tool to choose, inputSchema must state which arguments are valid. Explicit types, shallow structures, and constrained choices reduce the values the model has to invent. Schema authors should keep inputs as flat as possible, because deeper nesting adds tokens and makes it harder to build an argument. When complex hierarchies are necessary, the recommended alternatives are to decompose arguments into simple types or split functionality into more specific tools. Required fields must also be declared explicitly.
A status property constrained to "active", "paused", or "archived" defines a closed set, while a bare string with those choices mentioned only in prose still admits other strings. The distinction is between guidance and enforcement. An enum makes any invalid value the model emits rejectable.
AAIF’s analysis identifies JSON Schema 2020-12 support for inputSchema and outputSchema in MCP 2026-07-28. Its transfer_funds example contrasts a compliance rule written only in a description with a machine-enforced condition. With if and then, an amount greater than 10000 can require compliance_approval_code, rejecting an illegal high-value payload before business logic runs. oneOf requires exactly one valid argument combination, preventing mixtures of incompatible operation modes. $defs and $ref keep shared field fragments in one place, reducing drift between tools.
This expressiveness also needs limits at implementation time. Implementations must not automatically dereference external $ref URIs and should bound schema depth and validation time. Otherwise, the machinery used to make valid inputs precise creates its own surface for abuse.
Behavioral annotations and what happens when they are missing
Even with valid inputs, a tool may be unsafe to run. Behavioral annotations address that separate question by signaling to the client whether a tool is read-only, destructive, or idempotent. The client uses these signals when deciding whether to request confirmation, log a call, or allow autonomous execution. Parameter descriptions are for the model, while these annotations are for the client. They describe how an operation should be handled.
Schema authors should set readOnlyHint to true on search, get, and list tools, and destructiveHint to true on create, update, delete, and send tools. Missing annotations leave risk classification ambiguous. Depending on client behavior, that ambiguity can produce a confirmation dialog on every search query or allow a deletion without warning. The former inserts human interruptions into workflows intended to run autonomously, while the latter creates safety and audit failures. Neither outcome is resolved by making the argument schema more precise.
For a brand or marketing tool that sends a campaign email or publishes a web page, a missing destructive hint can leave an irreversible action without a confirmation gate. Annotations supply the signal for that decision, but their effect depends on how the client uses it.
Structured error returns that give agents a path to self-repair
After execution, the agent needs a result that distinguishes success from a repairable failure. An empty array is not an error, yet it can be interpreted as evidence that nothing exists when the actual cause is a permission failure, rate limit, or stale record. Those conditions require different responses. If the return does not distinguish them, the model must infer the cause and may report a false conclusion to the user. A named, structured error tells the model what failed so it can decide what to do next.
AAIF demonstrates this repair loop with a LangGraph orchestrator and an MCP server implemented with FastMCP. The orchestrator catches a schema-shaped invalid-params error, repairs the argument, and retries. Structure makes the recovery step possible. A stack trace or HTTP 500 alone does not identify the argument correction that the orchestrator needs to make.
The same analysis describes MCP 2026-07-28 lifting the restriction that outputSchema must be a JSON object, allowing primitives and arrays to be validated too. Output validation keeps unexpected backend shapes out of the model’s context. Constraints must also be validated at the server’s code boundary, because agents can ignore schemas and malicious inputs can bypass client-side checks. A declaration alone does not enforce a contract.
The AAMAS 2026 paper Information Fidelity in Tool-Using LLM Agents finds that distortion grows linearly across sequential tool calls and that semantic weighting and periodic re-grounding, approximately every nine steps, reduce it. Structured errors that trigger repair can serve as inline re-grounding.
Tool count and context budget as schema design constraints
A precise individual schema still consumes part of a finite context budget. When the full tools/list is loaded into model context, every definition competes with the information needed for the task itself. A single tool definition runs roughly 100–500 tokens, so a multi-server roster with dozens of tools can consume tens of thousands of tokens before substantive work begins. Tool count is therefore an architectural constraint.
Anthropic’s engineering work found that adding the Tool Search Tool, which uses lazy-loading, cut the tokens used for tool definitions by roughly 85%. The June 2025 MCP-Zero paper takes this further with active tool discovery. Rather than inject every schema upfront, the agent identifies capability gaps and requests relevant tools on demand. The paper reports that the agent chose accurately from nearly 3,000 tools while using fewer tokens in ecosystems that can otherwise exceed 248,100 tokens.
MCP-Zero combines Active Tool Request, Hierarchical Semantic Routing, and Iterative Capability Extension. The first produces a structured request for a needed tool, while the second matches that request to relevant servers and then tools. The third builds the toolchain progressively instead of fixing the available capabilities upfront. Discovery becomes part of the agent’s workflow. For schema authors, the implication is to group tools into logical, discoverable clusters.
Tight descriptions, removal of redundant properties, and smaller focused tools reduce the cost of each capability when it is loaded. With logical grouping and dynamic discovery, the agent can find focused schemas without loading the entire catalog into context.
What consistent schema design means for brand agents that share context across tools
A customer support agent and a campaign content agent can draw from identical brand data yet diverge if their tools expose it through inconsistent schemas. Shared data is necessary but not sufficient. The tools also need to return the same structured representation so that each agent receives comparable rules. Schema consistency is therefore a brand infrastructure decision as well as an API concern.
A tool returning color, type, voice, and imagery rules as typed fields with provenance gives the model information it can apply, while a PDF blob requires interpretation and may be misread. Changes need an explicit signal too. When guidelines change, tools that return brand context should provide the current version through versioned, structured output schemas that clearly signal the changes. That lets connected agents pick up the revised rules without new prompts.
A tool checking finished AI-generated work should return evidence beyond a boolean pass/fail for each check, including which constraint was violated and why. This makes the result usable by an agent or a human reviewer. Teams and agencies managing several brands can then define brand capability tools once and compose them across agents and surfaces. The alternative, encoding brand rules separately in each agent’s prompt, leaves those rules exposed to drift over time.


