Model Context Protocol
MCP tool
An MCP tool is a named function that an MCP server offers to AI models, described by a name, a plain-language description and a JSON Schema for its input, and invoked with a tools/call request.
What it is
Tools are the part of the Model Context Protocol that lets a model act: query a database, call an API, run a calculation. The specification calls them model-controlled, meaning the model decides when to use them based on the conversation. Each tool definition has:
name, unique on the server, such asget_weather;- an optional
titlefor display; - a
descriptionthe model reads to decide when to use it; - an
inputSchema(JSON Schema) for the arguments, and optionally anoutputSchema; - optional
annotations, hints such as whether the tool only reads.
Why it matters
The description and schema are effectively part of the prompt. A model chooses tools by reading them, so vague names, overlapping descriptions or loose schemas lead to wrong calls. Anthropic's agent guidance says tool definitions deserve as much prompt-engineering attention as the prompt itself.
How it works
- The client sends
tools/list(paginated) and passes the definitions to the model. - The model emits a tool call; the client sends
tools/callwithnameandarguments. - The server returns
content(text, images, links) and, when it declares an output schema,structuredContent. - Failures come back two ways: a JSON-RPC error for protocol problems such as an unknown tool, or a result with
isError: truefor execution problems such as a bad date. The specification says clients should pass execution errors to the model so it can correct itself.
Example
{
"name": "create_ticket",
"description": "Create a ticket in the service desk.",
"inputSchema": {
"type": "object",
"properties": {
"title": {"type": "string"},
"priority": {"type": "string", "enum": ["low", "medium", "high"]}
},
"required": ["title"]
}
}
Common pitfalls
- One tool per endpoint. Mapping a large API one-to-one produces hundreds of tools. See tool overload.
- Trusting annotations. The specification says clients must treat annotations as untrusted unless they come from a trusted server; a "read-only" hint enforces nothing.
- Tool poisoning. The OWASP MCP cheat sheet treats the whole tool schema, not only the description, as a possible injection surface. See prompt injection.
- Errors without a next step. "400 Bad Request" teaches the model nothing; say what was wrong and what to send instead.
How actionlake handles it
The actionlake server exposes eight tools, and the list never grows: help, find_actions, get_action, do, ask, check, cost and account. The 289,000+ vendor actions are not tools. An agent searches them with find_actions, reads one action's full schema with get_action, and runs it with do, or asks a question across systems with ask. Only do and ask can cost money; the other six are free. Whatever a tool's hints say, the key's permissions decide what runs. See the eight tools on the docs page.
Questions
How many tools should an MCP server expose?
As few as the job allows. Anthropic's documentation says Claude's tool selection degrades past 30 to 50 tools, so large catalogues are better searched on demand than loaded whole.
What is the difference between an MCP tool and an MCP resource?
A tool is a function the model can invoke, and it may change things. A resource is data the model or the person can read, identified by a URI.
Are MCP tool annotations enforced?
No. Annotations such as readOnlyHint are hints from the server. The specification tells clients to treat them as untrusted unless the server is trusted; enforcement has to live on the server.
Related terms
- Tool callingTool calling, also called function calling, is a language model's ability to answer with a structured request to run a named function with arguments, which the application executes before handing the result back to the model.
- MCP serverAn MCP server is a program that offers tools, resources and prompts to AI applications over the Model Context Protocol, usually by wrapping one system's API, such as a ticket desk or an accounting ledger.
- Tool overloadTool overload is the loss of accuracy and context space that happens when an AI model is given more tool definitions than it can reliably choose between; Anthropic's documentation says Claude's tool selection degrades once more than 30 to 50 tools are available.
- Prompt injectionPrompt injection is an attack in which text that a language model reads, typed by a user or hidden in a web page, email, document or tool result, changes the model's behaviour, and in a tool-using agent it can turn into real actions.
- Dry runA dry run checks whether an agent's action would succeed, whether it is allowed and what it would cost, by validating the inputs, permissions and connection without sending anything to the vendor.
Sources
Connect an agent. Start free.
100,000 calls free every month. No card. Hard caps on every key.