What Are MCP Tools?
Tools are functions that an MCP server exposes for AI models to call. Servers use tools to fetch data, run computations, modify state, or trigger side effects. Hosts discover available tools and decide how to present them to the model and user.This page follows the core MCP
2025-11-25 specification. MCP Apps adds UI metadata to the normal
tool definition but keeps the same discovery, invocation, result, and error model.Declare the Tools Capability
A server that exposes tools declares thetools capability during initialization:
listChanged to true only when the server sends notifications/tools/list_changed after its available tools change. The client can then call tools/list again.
Discover Tools with tools/list
The client calls tools/list to discover the server’s tools. This operation supports opaque cursor pagination, so clients must continue while the response contains nextCursor.
Validate Tool Input on the Server
Tools declare parameters with JSON Schema. When$schema is omitted, MCP uses JSON Schema 2020-12. inputSchema must be an object, including for tools with no parameters:
isError: true. A malformed tools/call request uses a JSON-RPC protocol error.
TypeScript SDKs can accept schemas from libraries such as Zod and convert them to JSON Schema.
Invoke a Tool with tools/call
The client calls tools/call with the tool name and arguments. The server validates the arguments, checks authorization, executes the tool, and returns a result.
Return Tool Results
Tool results commonly use these fields:content: Content blocks such as text, images, audio, resource links, or embedded resources.structuredContent: Optional JSON object for typed programmatic data. MCP Apps can pass it to the View.isError: Marks a tool execution error._meta: Optional client or component metadata. Do not use it for facts the model must read.
structuredContent, MCP says it SHOULD also return serialized JSON in a text content block for backwards compatibility. If the tool declares outputSchema, the server MUST return structuredContent that conforms to it, and clients SHOULD validate the result.
See Tool Results and Model Context for the MCP Apps split between content, structuredContent, and _meta.
Return Actionable Errors
MCP separates two error types:
Tool execution errors should explain how the caller can fix the request because clients can pass that feedback to the model for a corrected retry.
Treat Annotations as Hints
Tools can include annotations that help hosts decide how to handle them. These hints do not replace authorization or user confirmation for sensitive actions.
Clients MUST treat annotations as untrusted unless they trust the server. Servers still need authentication, authorization, rate limits, input validation, and safe output handling.
Declare Task Support
The optionalexecution.taskSupport field tells clients whether a tool supports MCP task-augmented execution:
Task support belongs to the core MCP tool contract. It is separate from whether an MCP App tool renders a View.
Related
registerAppTool
Register tools with UI metadata on the MCP server.
Tool and Resource Contract
See how MCP App tools, UI resources, and tool results fit together.
Tool Annotations
Use read-only, destructive, idempotent, and external-system hints in MCP App servers.
Core MCP Tools Specification
Read the normative tools protocol and security requirements.