Resources / MCP

Designing MCP tools that models use correctly

Names, descriptions, schemas and outputs that help AI agents pick the right MCP tool and call it with the right arguments.

An MCP server is only as useful as its tools are clear. The model never sees your code — it sees a name, a description and an input schema, and from those alone it decides whether to call the tool and what to pass. Most "the agent did something weird" bugs are tool design bugs.

Name tools after the job, not the endpoint

Prefer get_order_status over orders_v2_get. A good name is a verb and an object in plain words. Keep a consistent scheme across a server — list_*, get_*, create_*, cancel_* — so the model can guess what exists.

Write descriptions for a new colleague

The description is a prompt. Say what the tool does, when to use it, and when not to:

Look up an order by its id and return its status, items and shipping
address. Use this when the user mentions an order number. Don't use it
to search orders by customer — use find_orders for that.

Mention units, formats and limits ("amount in cents", "dates as YYYY-MM-DD", "at most 50 results").

Make the schema do the work

See JSON Schema for APIs and AI tools for a primer.

Return results the model can use

Return compact, structured JSON with the fields the model needs to answer — not the raw upstream payload. Include identifiers the model can pass to the next tool. When something fails, return a clear message the model can act on: "No order 1042. Ask the user to check the number." beats a stack trace.

Fewer, sharper tools

Ten focused tools beat forty overlapping ones. Every tool you add costs context and creates another chance to pick the wrong one. If two tools differ by one parameter, merge them.

Mark what's safe

MCP lets servers annotate tools as read-only or destructive. Clients use these hints to decide when to ask the user for confirmation. Mark lookups as read-only and anything that deletes or sends money as destructive.

In Wisp

Each endpoint becomes a tool named after it, described by its description and input and output schemas — which the assistant writes and keeps in sync with the code. See MCP server for your project.

Try it: JSON to JSON Schema converter · Template: weather MCP tool

Build it with Wisp — describe an API, get it live.

Related