A Tool Definition is the formal specification of an executable function within the Model Context Protocol (MCP), comprising a unique name, a human-readable description, and a JSON Schema object that defines the structure, data types, and validation rules for its required input parameters. This definition acts as a contract between an MCP server, which implements the tool's logic, and an MCP client, such as an AI assistant, enabling the client to understand how to correctly invoke the external capability.
Glossary
Tool Definition

What is a Tool Definition?
The formal specification for an executable function within the Model Context Protocol.
The input schema within the definition provides a machine-readable blueprint that allows clients to generate properly formatted arguments, enabling structured output guarantees and reducing errors. By standardizing how tools are described, MCP facilitates tool discovery, secure tool invocation, and reliable integration, allowing AI agents to dynamically extend their capabilities by interacting with databases, APIs, and other external systems.
Core Components of a Tool Definition
A Tool Definition is the formal specification that enables an AI agent to understand and safely invoke an external function. It acts as a contract between the MCP server and client.
Name
The unique identifier for the tool within the server's namespace. It must be a clear, alphanumeric string (often using snake_case) that the AI model uses to reference the tool in its reasoning.
- Example:
get_current_weatherorcreate_calendar_event - Purpose: Provides a stable API for the model to call. Changing a tool's name is a breaking change for any client or prompt that references it.
Description
A natural language explanation of the tool's purpose, behavior, and any critical constraints. This text is injected into the AI model's context to guide its decision on when and how to use the tool.
- Key Elements: Should state the tool's goal, the meaning of its inputs/outputs, and side effects (e.g., 'This tool charges the user's credit card').
- Best Practice: Write for the AI, not just humans. Be explicit about preconditions and outcomes to prevent misuse.
Input Schema
A JSON Schema object that rigorously defines the structure, data types, validation rules, and optional descriptions for all parameters the tool accepts.
- Core Function: Enforces type safety and validates arguments before the handler executes.
- Common Properties:
type(e.g.,object),properties,requiredarray, and nested schemas for complex parameters. - Example Schema: Defines that a
cityparameter is a required string and aunitparameter is an optional string that must be either'celsius'or'fahrenheit'.
Tool Handler
The server-side implementation function (business logic) that executes when the tool is invoked. It receives the validated input arguments, interacts with the external system (API, database, script), and returns a result.
- Separation of Concerns: The definition is the interface; the handler is the implementation.
- Execution Flow: MCP Client → JSON-RPC Request → Schema Validation → Handler Execution → JSON-RPC Response.
- Responsibility: Contains all authentication, networking, error handling, and data transformation logic specific to the integrated service.
Structured Output
While not always explicitly defined in a separate schema, the tool's return value is a structured JSON object. Consistent output structure is crucial for the AI client to parse and reason about the result.
- Implicit Contract: The handler's return type forms an output schema.
- Best Practice: Document the output shape in the tool's description. For complex returns, some frameworks allow defining an output JSON Schema.
- Example: A weather tool should always return an object with
{ "temperature": number, "conditions": string }.
Related Concepts
A Tool Definition does not exist in isolation. It integrates with several key MCP and API execution concepts:
- Schema Validation: The runtime process that checks tool inputs against the Input Schema.
- Tool Invocation: The JSON-RPC call from client to server that triggers the handler.
- API Schema Integration: The practice of automatically generating Tool Definitions from existing OpenAPI/Swagger specifications.
- Orchestration Layer: The system that manages the sequencing, error handling, and caching of multiple tool calls within an agent's workflow.
How Tool Definitions Work in AI Systems
A Tool Definition is the formal specification that enables an AI agent to understand and correctly call an external function or API.
A Tool Definition is a structured schema that formally describes an executable function to an AI agent, such as a large language model. It specifies the tool's name, a natural language description of its purpose, and a JSON Schema object that defines the required input parameters, their data types, and validation rules. This definition acts as a contract, allowing the AI to construct a valid call with the correct arguments. In protocols like the Model Context Protocol (MCP), these definitions are dynamically provided by MCP Servers to MCP Clients, enabling secure, structured interaction with external systems.
The JSON Schema within the Tool Definition is critical for schema validation, ensuring the AI-generated inputs are type-safe and conform to the backend API's expectations before execution. This prevents malformed requests and runtime errors. The definition is used during tool invocation, where the client sends a request containing the populated parameters to the server's tool handler. This mechanism, central to function calling, allows AI systems to move beyond text generation to perform concrete actions like querying databases, sending emails, or updating records, based on a standardized, machine-readable interface.
Frequently Asked Questions
A Tool Definition is the formal specification of an executable function within the Model Context Protocol (MCP). It provides the blueprint that enables AI agents to understand and securely invoke external capabilities.
A Tool Definition is the formal specification of an executable function within the Model Context Protocol (MCP), comprising a unique name, a human-readable description, and a JSON Schema object that defines the structure, data types, and validation rules for its input parameters. It acts as a contract between an MCP server and an AI client, enabling the client to understand what the tool does, how to call it, and what arguments it requires. This definition is advertised by the server during capability negotiation and is used by the client to construct a valid tool invocation request. The schema ensures type safety and prevents malformed calls by validating inputs before they reach the server's tool handler.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
A Tool Definition is a core component of the Model Context Protocol. These related concepts define the ecosystem in which tools operate and are managed.
MCP Tool
An MCP Tool is the executable function exposed by a server that a client can invoke. It is the runtime instantiation of a Tool Definition. The Tool Definition provides the contract (name, description, input schema), while the MCP Tool is the capability made available over the protocol.
- Invocation: A client calls the tool by sending a JSON-RPC request with arguments matching the input schema.
- Execution: The server's Tool Handler processes the request and returns a result.
- Example: A Tool Definition for
search_databasebecomes an MCP Tool when the server advertises it during capability negotiation.
Tool Handler
A Tool Handler is the server-side implementation function that contains the business logic executed when an MCP client invokes a tool. It is the backend code that fulfills the promise of the Tool Definition.
- Input Processing: Receives and validates the client-provided arguments against the Tool Definition's JSON Schema.
- External Integration: Typically contains code to call an internal API, query a database, run a script, or interact with an external service.
- Result Formatting: Returns a structured result (often a string or JSON object) that the client can inject into the model's context.
- Critical Role: The handler is where security, error handling, and idempotency are implemented for the tool.
JSON Schema
JSON Schema is a declarative language for validating the structure and content of JSON data. In an MCP Tool Definition, the inputSchema property must be a valid JSON Schema object.
- Type Enforcement: Defines the required data types (string, number, object, array) for each input parameter.
- Validation Rules: Specifies constraints like
requiredfields,enumvalues,minimum/maximum, and regexpatternmatching for strings. - Structured Output Guarantees: Ensures the AI agent generates correctly formatted arguments before the tool is invoked, preventing runtime errors.
- Example: A
create_tickettool's schema would define required fields fortitle(string),priority(enum: ["low", "medium", "high"]), anddescription(string).
Tool Invocation
Tool Invocation is the act of an MCP client sending a tools/call request to a server to execute a defined tool. It is the runtime execution of a Tool Definition.
- Request Flow: The client sends a JSON-RPC request containing the tool name and an
argumentsobject. - Schema Validation: The server validates the
argumentsagainst the tool's input schema before passing them to the handler. - Result Flow: The server executes the handler and returns a response containing the
content(result) of the tool call. - Orchestration: Complex agent workflows involve sequential or conditional tool invocations based on prior results.
Capability Negotiation
Capability Negotiation is the initial handshake process in MCP where a client and server exchange their supported protocol versions and the features they provide. This is how a client discovers the available Tool Definitions.
- Initialization: During connection setup, the server sends an
initializerequest to the client. - Server Announcement: The server's response includes a
capabilitiesobject listing thetoolsit provides. Each listed tool corresponds to a Tool Definition. - Client Subscription: The client indicates which capabilities (like
tools) it wishes to use. - Dynamic Tooling: This process allows tools to be added or removed from a server without client reconfiguration, as they are advertised dynamically.
Schema Validation
Schema Validation is the process of verifying that the structure and data types of a tool's input arguments conform to its declared JSON Schema definition. It is a critical safety and correctness layer in MCP.
- Server-Side Enforcement: Occurs on the MCP server immediately upon receiving a
tools/callrequest, before the Tool Handler is executed. - Error Prevention: Rejects malformed requests with a clear error, preventing undefined behavior in the handler.
- Client-Side Guidance: The schema also guides the LLM in the client to generate valid arguments, acting as a form of structured output guarantee.
- Two-Phase Safety: Combined with client-side parsing, it creates a robust defense against malformed or malicious tool calls.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us