all posts

How to test MCP tool design

A design test scores whether the model picks the right tool, fills arguments that mean the right thing, and skips the calls it does not need.

Abracadabra Team Playbook 14 min read Updated
“Find the companies from the trade show.”
SelectionFirst tool the case allows
ArgumentsSchema-valid and meant
Wasted callsProbes and near-misses

Re-run before a description merges.

The short version

  • A server that starts can still offer tools the model picks badly.
  • Write about 50 prompts in users’ words, including no-tool, clarifying and near-miss cases.
  • Score selection rate, argument validity and wasted-call rate. Set the bars before you look.
  • Tag each result with the model id, client and run date.
  • A name, description or schema change is a behaviour change. Re-run before you merge it.

What is MCP tool design testing?

It checks the model’s choice of tool, the arguments, and the calls that were not needed.

Vendor guides show that a server starts. The MCP Inspector lists tools and calls the tool you name. A tools/list or a tools/call you invoke yourself does the same job: the process is up, the schema parses, a result comes back. None of that asks whether the design is right.

Tool design is the name, the description and the input schema the model reads before it chooses. The tools page of the MCP specification, read on 30 Nov 2026, calls tools model-controlled. This means that the model discovers them and invokes them from the user’s prompt. A tool is a name, an optional description, and an inputSchema. That schema is JSON Schema, and it defaults to draft 2020-12 when you set no $schema. The client lists tools. The model picks. The client calls. A design test starts at the pick.

Short answer. How to test MCP tools: run prompts in users’ words, including turns that should call nothing, and score three rates. Did the first tool match the case? Were the arguments schema-valid and the ones the user meant? How many calls were extras? Tag each result with what ran it, and run the suite again before any tool edit merges.

This is for agent engineers, and for anyone who owns an MCP server already in use. If initialize fails, fix that first. The cases below are illustrative, not a measured server and not a customer result. They use the contact tools from the rest of this site, plus find_accounts, so a near-miss has a neighbour. This page did not send the prompts to a model. It did run the scorer on made-up calls.

How does an MCP tool design test work?

You freeze the tool list, send a user prompt, record the calls, and score them.

The loop has one direction. A prompt goes in. The same tools/list the client would send goes in with it. The model returns tool calls, or none. A scorer marks selection, arguments and wasted calls. The row is stamped with what produced it. A fail sends you back to the name, the description or the schema, and the suite runs again before that edit merges.

The test loop, from the user’s words back to the tool list

The tool design test loop. A prompt in the user’s words meets the tool list, the calls are scored, and a failed design is edited and run again before it merges. 1. User prompt Their words, not a tool name 2. Tool list Name, description, schema 3. Tool calls Whatever the model chose 4. Score Selection, arguments, wasted calls Pass: stamp the row Model, version, client, date Fail: edit the design Name, description or schema Re-run before merge

Two checks get confused because both can be green on the same afternoon.

swipe to compare who chooses the tool
CheckWho chooses the toolWhat a pass means
Inspector, or a tools/call you nameYouThe server started and returned a result for that name
Design suiteThe model, from the user’s wordsThe first tool was allowed, the arguments meant the right thing, and extra calls stayed rare

The specification draws the same split: the client lists tools, the model selects, the client calls. Inspector sits on the call. The suite sits on the select. A server test that never lets the model choose will miss two descriptions that overlap.

A design suite is one kind of eval: a known case, a pass rule, and a run you can repeat. It is not a load test, and it is not a review of whether a directory will list the server. How Claude connectors are built and listed covers that path, including the Inspector step that comes first.

How do you write prompts in the user’s words?

Write about 50 prompts the way users phrase the job, and include turns that should not call a tool.

50 is a size you choose, not a number this page measured. It is large enough for the neighbours and small enough to re-run. Write it down next to the bars. Each prompt is one user turn, copied from a session and stripped of names, emails and account ids. Four kinds belong in the set.

  • The direct ask. “Update the contacts from the trade-show list.” Allowed tool: update_contacts.
  • The near-miss. “Find the companies from the trade show.” Allowed tool: find_accounts. The neighbour is find_contacts. If both descriptions say “find records from the show”, the model will split its choices. That split is the bug.
  • The no-tool turn. “Thanks, that is all I needed.” Allowed tools: none. A call here is wasted, even when the call would have succeeded.
  • The clarifying turn. “Update the leads.” No rows, no company, no field to match on. The pass is no tool call, and a reply that asks what is missing. A model that invents an email and calls update_contacts has failed, even when the object validates.

Keep a few prompts out of the editing pile. Those are the hold-out. You may read them when you score. You may not paste them into a description. A description that quotes the suite will pass the suite and fail the next sentence a person types.

If you cannot tell a wrong tool from a bad tool result, start with which part of the agent is failing. A loose description that also matches “go ahead” is a design bug: the model took a legal reading of a loose sentence. A tool that updates 3 contacts and reports success for 9 is a result bug. MCP observability is where that second bug shows up in the call log. The suite will not see it, because the call was the one the case allowed.

How do you score selection, arguments and wasted calls?

Score the first call for selection and arguments, and score every call the case did not allow.

Selection rate. If the case allows tools, the first call’s name must be in that list. If it allows none, there must be no call. Divide the passes by the cases. A later correct call does not repair a wrong first call. Recovery belongs with task success, not with this rate.

Argument validity. Only cases that allow a tool are in the denominator. Two gates, and a wrong first tool fails the rate before either gate. Gate one: the arguments validate against inputSchema. The tools page tells servers to validate that schema. Gate two: every expected field equals what the user’s words support. Some schema-valid arguments still make the wrong write. Examples are an invented email, a guessed date, or match_by of email when the user named a person and a company.

Wasted-call rate. A wasted call is any call whose name is outside the allow list. Divide wasted calls by all calls, not by cases. A no-tool case that fires once adds 1 to both. A probe of find_contacts before a correct update_contacts adds 1 wasted call and 2 calls. A chatty model cannot hide behind a large case count.

swipe to compare the three rates
MetricHow to computeIllustrative thresholdWhat a failure means
Selection rateCases whose first call is allowed, or which correctly call nothing, divided by cases0.90The model picked a neighbour, or called a tool when it should have asked or stopped
Argument validitySchema-valid calls that match the expected values, divided by cases that allow a tool. A wrong first tool fails0.85The call is the wrong shape, the wrong meaning, or the model never reached the right tool
Wasted-call rateCalls whose name is not allowed, divided by all calls0.10The model probed, retried, or hit a near-miss before the tool the case allowed

The thresholds are a bar you set before you look at a run. They are not a benchmark. This page did not measure a production server against them. If a team has one dangerous write, it may set argument validity higher than 0.85 and tolerate a lower selection rate. For that team, a wrong argument is the incident. Write the bar down next to the date. Moving the bar after a red run is how a suite stops meaning anything.

On the illustrative cases in the scorer below, the rates are 0.4, 0.0 and 0.6. They miss these bars on purpose, so the arithmetic is visible. They are not a score from a model.

A wrong tool that still returns isError: false is a silent failure. The server log looks healthy. The person got the other tool’s side effect, or nothing they asked for. A result with isError: true is the other case: the model can read it and retry, change the arguments, or stop. How that differs from a JSON-RPC protocol error is in tool errors, retries and idempotency.

What do you record on every result?

Stamp the model, its version, the client and the date on every result.

Without those four, a description edit and a model upgrade land in the same column.

The tools page says every request carries io.modelcontextprotocol/clientInfo in _meta, beside the protocol version and the client capabilities. That is the client. It is not the model. The harness that ran the suite stamps the model id itself. A family name is not a version.

Two clients can wrap the same model and still pick differently. One truncates the tool list. One adds a system line. Stamp the client name and version with the date of the run, not the date you wrote the case.

Keep the tool list hash on the row as well. A server log should hash tools/list so a later session can be tied to the list it saw. The same hash belongs on the suite result. A green row with no hash is a number you cannot attach to a diff.

When do you re-run the suite?

Re-run it before you merge any change to a tool name, description or schema.

The model does not see your diff. It sees the next tools/list. A tighter description, a renamed tool, a new required field, a changed enum: each one is a new behaviour. The specification lets a server emit notifications/tools/list_changed when the list changes, if it declared listChanged. That notification tells the client to refresh. It does not tell you the new text is easier to pick, or that a neighbour stopped stealing the call.

Run the suite on three triggers.

  • The list is about to change. A name, title, description, annotation or inputSchema is in the diff.
  • The model is about to change. A new model version does not inherit the old green row. Stamp the new id and run again.
  • The client is about to change. Truncation, a different system prompt, or a new host. Stamp the new client and run again.

Do not re-run for a comment, or for a result string, while the list is byte for byte the same. Whether the model recovers from a partial update is a session question, not this suite. Merge only when the three rates still clear the bars, on the same repeat count, with the new stamp.

Where do the prompts come from?

Lift them from real user turns, after you find the sessions that stopped or called the wrong tool.

Inventing 50 clever prompts tests your taste, not the wording people type. Search by meaning for phrases such as “the companies from the show”. Search by the tool event for sessions that called find_contacts when the task was the account. A tool event can match even when the user left no complaint in the text.

Read the turn. Topic, task, intent and signals stay attached to it. The annotated replay pins the tool call, and the friction, to that turn. Copy the sentence. Remove the name, the email and the account id. The allow list comes from turns where the same task finished, not from a guess at the keyboard.

The workspace is where that search, those labels and the replay live. The feature list names the signals, including tool events, task progress and user corrections. Abracadabra does not run this suite, and it does not test MCP servers. It is how you find the wording. Later, it is how you check whether task success on that task moved after the description change, against the previous period. The suite can go green while the task still stops. Read both.

MCP events are a different feed: the product telling an agent that something happened. They are not a substitute for the user sentence, and they are not a score.

What does one test case look like?

One case stores the prompt, the allowed tools, and the argument values the words support.

The case is the contract. The result of a run is stored next to it, not inside it. The note says the wording is illustrative, so nobody later treats it as a log line.

Illustrative case, not a recorded user

{
  "id": "near-miss-accounts",
  "prompt": "Find the companies from the trade show.",
  "allow": ["find_accounts"],
  "need": { "source": "trade_show" },
  "reply_must_ask": false,
  "note": "illustrative wording, not a recorded user"
}

A no-tool case uses "allow": [] and "need": {}. A clarifying case uses the same empty allow list, and sets "reply_must_ask": true, so a silent agent does not pass on an empty call list. The scorer in the next section checks the calls. It does not grade the question text. If silence is a real failure, add that second check in a few lines: the reply contains a question, and it names the missing field. Do not send that sentence to a model judge when a string check can see it.

Illustrative result stamp, not a measured run

{
  "case_id": "near-miss-accounts",
  "model": "example-model",
  "model_version": "example-model-2026-11-01",
  "client": "example-client",
  "client_version": "1.0.0",
  "tool_list_hash": "example-hash",
  "date": "2026-11-30",
  "calls": [
    { "name": "find_contacts", "args": { "source": "trade_show" }, "schema_ok": true }
  ]
}

The names example-model and example-client are placeholders. On a real row they are the provider’s model id and the clientInfo name and version. The date is the day you ran it. This object is the shape, not a result from a server.

How do you score a recorded run?

Apply the three definitions in code, and print the rates from the cases you stored.

The function below does not call a model, and it does not talk to a server. It reads recorded calls. schema_ok is the JSON Schema gate, computed against inputSchema before this function runs. In this illustration every tool-allowing case sets that flag true, so the failure you see is meaning, or a wrong first tool. This page ran the function. The print is 0.4 0.0 0.6.

A scorer over recorded calls, on illustrative cases.

CASES = [
    {"allow": ["update_contacts"], "need": {"match_by": "name_and_company"}, "schema_ok": True, "calls": [{"name": "find_contacts"}, {"name": "update_contacts", "args": {"match_by": "name_and_company"}}]},
    {"allow": [], "need": {}, "calls": []},
    {"allow": [], "need": {}, "calls": [{"name": "update_contacts", "args": {"match_by": "email"}}]},
    {"allow": ["find_accounts"], "need": {"source": "trade_show"}, "schema_ok": True, "calls": [{"name": "find_contacts", "args": {"source": "trade_show"}}]},
    {"allow": ["update_contacts"], "need": {"match_by": "name_and_company"}, "schema_ok": True, "calls": [{"name": "update_contacts", "args": {"match_by": "email"}}]},
]

def score(case):
    calls, allowed = case["calls"], set(case["allow"])
    first = calls[0] if calls else None
    picked = (first["name"] in allowed) if allowed else not calls
    args = (first.get("args") or {}) if first and picked else {}
    valid = (picked and case.get("schema_ok", False) and all(args.get(k) == v for k, v in case["need"].items())) if allowed else None
    wasted = sum(c["name"] not in allowed for c in calls)
    return picked, valid, wasted, len(calls)

rows = [score(c) for c in CASES]
scored = [r[1] for r in rows if r[1] is not None]
n_calls = sum(r[3] for r in rows)
print(round(sum(r[0] for r in rows) / len(rows), 2), round(sum(scored) / len(scored), 2), round(sum(r[2] for r in rows) / n_calls, 2))

Selection is 2 of 5 cases, which is 0.4. Argument validity is 0 of the 3 cases that allow a tool, which is 0.0. Wasted calls are 3 of 5 calls, which is 0.6. If your printer shows anything else, the function and the cases have drifted apart.

CaseFirst callSelectionArgumentsWasted
Update, after a person-tool probefind_contactsFailFail1 of 2
Thanks, that is allNonePassNot scored0
Update the leads, and a guessed callupdate_contactsFailNot scored1 of 1
Companies, but the person toolfind_contactsFailFail1 of 1
Person and company, matched by emailupdate_contactsPassFail0 of 1

Row 5 is the one to keep. Selection passes, because update_contacts was allowed. match_by is email, which sits in the enum, so the schema flag is true. The expected value was name_and_company, because the request gave a name and a company but no email address. Arguments fail. Nothing is wasted. A schema check alone would have passed the bug.

When should you not test MCP tool design this way?

Skip it when the server is down, the tool has no neighbour, or the description quotes the prompts.

  • The server does not start. Auth, transport and a broken tools/list belong in Inspector. A design score on silence is noise.
  • One tool, and a tiny schema. Selection has nothing to confuse. Keep the argument check if a wrong value can write. A selection rate stuck at 1.0 teaches nothing.
  • You need task success. A correct update_contacts can update 3 contacts out of 9 and report success. This suite marks that call as a pass. Read the session for the person.
  • Cost. About 50 prompts, repeated, each run sending the full tool list. This page did not measure tokens or money. The bill returns on every description change. Run it on the three triggers, not on every keystroke.
  • Non-determinism. One red row is not a regression, and one green row is not a pass. Fail the case on a rate across a repeat count you wrote down. An illustrative rule is 5 repeats and 4 selections. That is a starting point, not a measured sample size. A shared cache is one draw wearing five names.
  • Overfitting. A description that starts to quote the prompts has leaked. Hold-out prompts, and the next batch of real wording, are the check. Green on the pile you edited, red on a sentence you have not seen, is a failed design.
  • Two changes in one diff. A model upgrade beside a description edit cannot be read. Stamp both. Change one.

A stronger model does not retire the suite. It reads the same tool list. A vague description still has two legal readings, and a careful model will pick one of them.

How to tell it worked

The prompts that called the neighbour now call the allowed tool, and fewer live sessions stop on that wrong call.

Before the change, “companies from the trade show” selects find_contacts. The argument case sends match_by of email for a person and a company. After it, the same prompts, on the same model and client, clear the three bars across your repeat count. The row carries the new tool list hash, the same model version, and the run date. If the model version also moved, you do not have a description result.

In real conversations the signal is quieter, and it is the one that matters. People stop correcting the tool, as in “the company, not the person”. Sessions that used to stop after the wrong tool now finish the task. Compare task success on that task and cohort with the previous period, one description change at a time.

Search again by meaning and by the tool event. Open the replay on a session that still stops. If the user’s wording is new, add it to the suite, with the name and the account id removed. The suite does not invent the next prompt. The conversations do.

What should you do first?

Start from sessions that called the wrong tool, and re-run before you merge.

  1. Pull the user turns from sessions that stopped or called a neighbour tool. Strip names and ids.
  2. Write the allow list from tasks that finished, including no-tool and clarifying turns.
  3. Set the three bars, the repeat count, and the four stamps before you run anything.
  4. Validate arguments against inputSchema, then score the recorded calls with the function above.
  5. Change one name, description or field. Re-run. Then look at task success on the next period.

Common questions about testing MCP tools

These are the questions people ask before they treat Inspector as a design test.

How do you test MCP tools?

Send the model realistic user requests alongside the tool list a client would send, then score the first tool it picks, its arguments and any extra calls. A tools/call you name yourself only proves the server answered.

What is an MCP tool selection eval?

It is the selection rate: the share of cases whose first tool call is one the case allows, or which correctly call nothing. Near-miss prompts, where two tools could both sound right, are the cases that move this number.

How do you evaluate an MCP server?

Split the question. Evaluate the server with Inspector and with calls you name, so you know it starts and validates arguments. Evaluate the design with this suite, so you know the model picks well. Then read live sessions, because a correct call can still be a failed task.

Does a schema-valid tool call mean the arguments are right?

No. JSON Schema checks types, required fields and enums. It cannot tell that an email was invented, or that email was the wrong way to match a person and a company. Argument validity is the schema gate and the meaning gate.

When should you re-run an MCP tool test?

Before you merge a name, description or schema change, and again when the model version or the client changes. A list_changed notification is not a re-run.

all posts

Read how agents use the tools after release.

Abracadabra shows which tasks finish and the tool calls where the rest stop.