Model Context Protocol defines each tool with a unique name and metadata that describes its schema. According to Anthropic, tool descriptions and definitions are loaded into the agent’s context and can guide how it calls tools. The definition includes the name and a short description, as well as the expected inputs, outputs, and fields that describe the tool’s behavior.
Define the tool’s purpose
Anthropic recommends giving each tool a clear, distinct purpose. Tools should help the agent break a task into smaller pieces and solve them. Too many tools or tools with overlapping functions can make it harder for an agent to choose an approach. Tools with unclear purposes can also leave the agent unsure which one to use.
Anthropic’s address book example uses search_contacts or message_contact in place of list_contacts. Having the agent read through a list of every contact can fill its limited context with irrelevant information. The search_contacts tool is designed to find the relevant contact.
A tool can combine several operations or API calls behind the scenes. Anthropic gives the example of schedule_event, which finds a suitable time and creates an event in place of separate list_users, list_events, and create_event operations. This lets the tool handle a common multistep task in a single call.
In another example, search_logs returns the relevant log lines along with the surrounding context. The get_customer_context tool brings together relevant customer information in place of separate get_customer_by_id, list_transactions, and list_notes tools. Anthropic also discusses how tool names can reflect the natural boundaries between tasks.
Write the name and description
In a Model Context Protocol tool definition, name is the tool’s unique identifier. The title field is an optional human-readable display name. The description field explains what the tool does in human-readable terms. The inputSchema defines the expected parameters, and the optional outputSchema defines the expected output structure. The optional annotations field describes aspects of the tool’s behavior.
Anthropic recommends writing the description as if you were explaining the tool to someone who just joined the team. Authors may take for granted details such as special query formats, the meaning of domain-specific terms, or how the entities used by the tool relate to one another. Anthropic recommends spelling out those details.
Related tools can be grouped under shared prefixes. Anthropic gives asana_search and jira_search as examples that start with the service name. More granular groupings use names such as asana_projects_search and asana_users_search. Anthropic notes that MCP clients sometimes group tools themselves.
According to Anthropic, prefixes and suffixes can affect evaluation results, and their effects vary by LLM. Anthropic recommends choosing a naming convention based on the results of your own evaluations. The tool’s name and how it relates to other tools can influence which tool the agent chooses.
Define inputs clearly
In Model Context Protocol, inputSchema is a JSON Schema that defines the expected parameters. In MCP’s weather example, the tool is called get_weather and takes a location field as input. The schema sets the type of location to string. The field’s description specifies that it expects a city name or postal code, and the required list includes location.
In the same example, the tool’s own description says that it retrieves weather information for a location. The location field’s description explains the expected input. The tool description and parameter description appear at different levels of the definition.
Anthropic recommends describing the expected inputs and outputs clearly and enforcing them with strict data models. It emphasizes using unambiguous parameter names. Its example uses user_id in place of user.
The Model Context Protocol flight search example also defines its parameters in separate fields. For searchFlights, the origin and destination fields are both defined as string. Each field has its own description, and both appear in the required list. The tool’s description explains that it searches for flights, while the parameter descriptions identify the departure and arrival locations.
Define outputs and error reporting
In MCP, outputSchema is an optional JSON Schema that defines the expected output structure. When a tool provides this schema, the server must return structured results that conform to it. Model Context Protocol recommends that the client also validate structured results against the schema.