How to Write MCP Tool Descriptions That AI Agents Use Correctly
A practical guide to writing MCP tool descriptions: a five-part template, before-and-after examples, naming, parameter schemas, tool annotations, common mistakes, and how to test tool selection.

Kelis Shekhaliya

TL;DR
Write each MCP tool description as a short selection instruction: what it does, when to use it, when not to, its side effects, and what it returns. Back it with action-oriented names, a strict inputSchema, and matching annotations, enforce security in code, and test with prompts that should and should not trigger each tool.
An MCP tool description is the text an AI client reads when it decides whether to call a tool, so write it as a short selection instruction, not as API reference. A good description says what the tool does, when to use it, when not to use it, what it changes, and how it differs from similar tools. Pair it with a clear action-oriented name, parameter descriptions that state formats and limits, and a strict input schema. Then test it with prompts that should and should not trigger the tool, and rewrite anything the model gets wrong.
This guide is for SaaS founders, CTOs, and API teams turning an existing API into an MCP server. It covers why descriptions matter more than they look, a simple template, before-and-after examples, parameter and schema tips, tool annotations, and how to test descriptions before your customers' agents rely on them.
Why MCP tool descriptions matter
When an MCP client connects to your server, it sends a tools/list request and receives each tool's name, optional title, description, and inputSchema. The language model then reads that metadata alongside the user's request and picks which tool to call, if any. The model never sees your source code or your internal docs. For the model, the description and the schema are the tool.
That has three practical consequences:
Vague descriptions cause wrong calls. If
get_orderandsearch_ordersboth say "Get orders", the model has to guess which one fits.Missing descriptions cause missed calls. A tool that does not say when it is useful is often ignored, even when it is the right answer.
Unclear side effects cause unsafe calls. If a description does not say a tool sends an email or charges a card, nothing in the text warns the model to slow down.
Descriptions generated straight from an OpenAPI summary are a starting point, not a finished product. Summaries such as "Returns a list of users" were written for human developers who already know the API. An agent needs more context than that. If your spec is thin, start with how to prepare an OpenAPI specification for MCP tool generation.
A simple template for every tool description
Most good descriptions answer the same five questions in two to five sentences:
What does it do? One sentence, starting with a verb: "Retrieves", "Creates", "Cancels".
When should the model use it? Describe the user intent: "Use when the user asks about the status of a specific order."
When should it not use it? Point to the better tool: "Use
search_orderswhen you do not have the exact order ID."What does it change? State side effects plainly, or say it changes nothing: "This tool does not modify the order."
What comes back? Mention the key fields or what an empty result means: "Returns an empty list when no orders match."
You do not need all five for every tool. A simple read-only lookup may need two sentences. A tool that deletes data or moves money should cover all five.
Before and after examples
Weak:
name: orders
description: Manage customer orders.Better:
name: get_order
description: Retrieves one order by its exact order ID (starts with ord_).
Use search_orders when the ID is unknown. Read-only: this tool does not
change the order. Returns status, line items, totals, and shipping details.Weak:
name: post_tickets
description: POST /ticketsBetter:
name: create_ticket
description: Creates a new support ticket for a customer. Use only when the
user explicitly asks to open a ticket, not to look up existing ones (use
list_tickets for that). Sends a confirmation email to the customer.
Returns the new ticket ID.The better versions are longer, but every extra word helps the model choose correctly or avoid an unwanted action.
Name tools so the description has less to explain
The name is the first signal a model sees. Use stable, action-oriented names in a consistent pattern, such as verb_noun: list_customers, get_customer, update_customer, archive_customer. Avoid names that mirror HTTP paths or internal service names, like post_v2_cust_upd.
The MCP specification recommends tool names between 1 and 128 characters, unique within a server, using only ASCII letters, digits, underscores, hyphens, and dots, with no spaces. Names are treated as case-sensitive, so pick one style and keep it. If you want a friendlier label in client interfaces, use the optional title field rather than changing the name, because renaming a tool can break prompts and workflows that depend on it. For how renames fit into a release process, see how API changes affect MCP servers.
Describe parameters and let the schema do the hard work
A tool description guides selection. The inputSchema is what stops bad input. Treat each parameter as its own small description:
Use the right type. Numbers as
numberorinteger, flags asboolean, not everything asstring.State formats and units. "ISO 8601 date, for example 2026-11-21", "Amount in cents", "Two-letter country code".
Use enums for closed sets.
statuswithopen,pending,closedis far easier for a model than free text.Mark what is required. And give defaults for optional values, such as a sensible
limit.Add limits. Minimum and maximum values, string lengths, and patterns such as
^ord_catch mistakes before they reach your API.Avoid ambiguous names.
user_idbeatsidwhen a tool touches both users and accounts.
Here is a compact example:
{
"name": "list_invoices",
"title": "List invoices",
"description": "Lists invoices for one customer, newest first. Use get_invoice when you already have an invoice ID. Read-only.",
"inputSchema": {
"type": "object",
"properties": {
"customer_id": { "type": "string", "description": "Customer ID, starts with cus_", "pattern": "^cus_" },
"status": { "type": "string", "enum": ["draft", "open", "paid", "void"], "description": "Optional status filter" },
"limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20, "description": "Maximum invoices to return" }
},
"required": ["customer_id"],
"additionalProperties": false
}
}Do not rely on description text to enforce anything important. A sentence like "only admins should call this" is a hint to the model, not a control. Authentication, authorization, and validation have to live in code, in your API or in the MCP layer. For the auth side, see API authentication for MCP.
Use tool annotations for behavior, not just prose
MCP tools can include optional annotations that describe behavior in a structured way. The commonly used hints are:
readOnlyHint: the tool does not modify its environment.destructiveHint: the tool may make destructive changes, such as deleting data.idempotentHint: calling it again with the same arguments has no additional effect.openWorldHint: the tool interacts with external entities outside the server's own data.
Clients can use these hints to decide when to ask the user for confirmation. They should match what the description says. The specification is clear that clients must treat annotations as untrusted unless they come from a trusted server, so annotations complement real safeguards rather than replace them.
Common mistakes to avoid
Copying endpoint paths as descriptions. "GET /v1/users/{id}" tells a model almost nothing about intent.
Near-duplicate tools. If two tools have nearly identical descriptions, merge them, disable one, or explain the difference in both.
Internal jargon. Terms like "SKU bundle reconciliation" mean nothing to a model without context. Use the words your users would use.
Hidden side effects. Always say when a tool sends, charges, deletes, or notifies.
Exposing too many tools. Every extra tool is another description competing for the model's attention. Expose the operations agents actually need; how to choose which API endpoints to expose as MCP tools covers that decision.
Unhelpful errors. When a call fails, return a tool execution error with
isError: trueand a message the model can act on, such as "Date must be in the future", so it can correct itself and retry.
How to test MCP tool descriptions
Descriptions are only good if models choose correctly with them. A simple test loop:
Write test prompts. For each tool, write a few requests that should trigger it and a few that should trigger a different tool or no tool.
Run them in real clients. Try the prompts in the clients your customers use, such as Claude, ChatGPT, Cursor, or VS Code, because each host presents tools a little differently.
Inspect the raw metadata. Use MCP Inspector to confirm the names, descriptions, and schemas the server actually returns. See how to test an MCP server with MCP Inspector.
Fix the wording, not the prompt. When the model picks the wrong tool, improve the description or schema so every user benefits, rather than teaching users special phrasing.
Retest after changes. A new tool can make an old description ambiguous, so rerun your prompts whenever the tool list changes.
Test write tools with limited credentials or a sandbox account before exposing them to production clients.
How 0mcp helps
0mcp generates MCP tools from an OpenAPI specification, REST API definition, or Postman collection, and creates a name and description for each operation. From the Tools page you can rename a tool, edit its description, review its inputs and request body, and enable or disable it, without changing your upstream API. Changes are saved as a draft, you can check tool behavior in the Playground, and connected clients keep using the current published version until you publish the new one. That makes it practical to improve descriptions iteratively instead of shipping them once and hoping.
Quick checklist
Action-oriented, consistent, unique tool names.
Each description says what, when, when not, side effects, and output.
Similar tools explain how they differ.
Every parameter has a type, description, format, and limits where relevant.
Annotations match the description.
Security rules are enforced in code, not only in text.
Errors return actionable messages.
Descriptions are tested with should and should-not prompts in real clients.
FAQ
01What is an MCP tool description?+-
It is the <code>description</code> field a server returns for each tool in <code>tools/list</code>. AI clients pass it to the language model, which uses it with the tool name and input schema to decide whether and how to call the tool.
02How long should an MCP tool description be?+-
Usually two to five sentences. Simple read-only tools can be shorter; tools that change data, send messages, or charge money should explain when to use them and their side effects in full.
03Should I use my OpenAPI summaries as tool descriptions?+-
Use them as a starting point, then rewrite them for an AI reader. Add when to use the tool, when not to, how it differs from similar tools, and what it changes.
04Can a tool description enforce security rules?+-
No. A description is guidance for the model. Authentication, authorization, input validation, and confirmation for risky actions must be enforced in code.
05What are MCP tool annotations?+-
Optional structured hints such as <code>readOnlyHint</code>, <code>destructiveHint</code>, <code>idempotentHint</code>, and <code>openWorldHint</code> that describe a tool's behavior. Clients may use them for confirmations, but must treat them as untrusted unless the server is trusted.
06How do I know if my tool descriptions work?+-
Write prompts that should and should not trigger each tool, run them in the MCP clients your users rely on, and check the raw metadata with MCP Inspector. Fix wrong choices by improving the description or schema.