Determinism
tools/list returns the 22 tools in the same order on every revision. Real computations compute; fake-world tools derive their data from a hash of the normalized arguments.
The same call always returns the same bytes, on Bun and on Node, on any machine. Different calls return different but internally consistent data: metric and imperial agree, currency conversions round-trip, a 3-day forecast is the start of the 7-day one, and weather://Madrid reads what get_weather reports for Madrid.
Arguments are normalized before hashing and matching: " madrid " and "Madrid" are the same city, "eur" and "EUR" the same currency.
await client.callTool({ name: "get_weather", arguments: { city: "Madrid" } });
// structuredContent: { city: "Madrid", temperature: 14, temperature_unit: "°C",
// conditions: "thunderstorm", humidity: 42, wind_speed: 55, wind_speed_unit: "km/h" }
await client.callTool({ name: "get_weather", arguments: { city: " madrid ", units: "imperial" } });
// structuredContent: { city: "Madrid", temperature: 57.2, temperature_unit: "°F",
// conditions: "thunderstorm", humidity: 42, wind_speed: 34.2, wind_speed_unit: "mph" }
Arguments that break a tool's input schema are a tool execution error (isError: true)
from 2025-11-25 on, and a JSON-RPC -32602 protocol error before it — as each revision's spec lists them.
An unknown tool is -32602 everywhere.
Real computations
Eleven tools that actually compute their answer. All are read-only and idempotent.
| Tool | Arguments | Returns |
echo | text | The text prefixed with "Echo: ", as a text block |
add | a, b (numbers) | { sum } |
calculate | expression, up to 1000 chars | { result }. A safe parser for + - * / % ^ and parentheses — no eval |
transform_text | text, operation: upper · lower · reverse · slug | { result } |
text_stats | text | { words, chars, lines } |
sort_list | items (up to 1000 strings), order?: asc · desc | { items }, sorted by code point |
convert_units | value, from, to: length (mm cm m km in ft yd mi), mass (mg g kg oz lb), time (s min h d), temperature (c f k) | { value, unit } |
hash_text | text, algorithm: md5 · sha1 · sha256 | { algorithm, hex } |
date_diff | from, to: YYYY-MM-DD (UTC) or date-times with an offset | { days, hours, seconds } |
color_swatch | color: #rgb, #rrggbb or a name; size?: 1–64 px, default 16 | A real PNG, as an image block |
simulate_work | steps?: 1–20, default 5; step_ms?: 0–2000, default 100 | { steps, completed }, after really waiting between steps |
simulate_work is the tool for everything that takes time: it sends notifications/progress on each step when the request carries a progressToken, it can be cancelled, it runs as a task for clients that declare the tasks extension, and a long step_ms lets a test exercise its client's timeout. See Progress & cancellation.
Fake world
Eleven tools that look up a world that doesn't exist, believably. Annotations tell the read-only lookups from the two that act: send_email and delete_file.
| Tool | Arguments | Returns |
get_weather | city, units?: metric · imperial | { city, temperature, temperature_unit, conditions, humidity, wind_speed, wind_speed_unit } |
get_forecast | city, days: 1–7, units? | { city, temperature_unit, days: [{ day, high, low, conditions, precipitation_chance }] }; day 1 is tomorrow |
search_web | query, limit?: 1–10, default 5 | { query, results: [{ title, url, snippet }] } plus a resource_link per result, all under example.com |
get_stock_price | symbol: 1–5 letters | { symbol, price, currency, change, change_percent } |
convert_currency | amount, from, to: ISO 4217 codes | { amount, from, to, rate, result }; rates are consistent across pairs |
get_user | user_id | { id, name, email, role, created_at } |
geocode | address | { formatted_address, latitude, longitude } |
get_flight_status | flight_number: airline code + 1–4 digits, e.g. IB3456 | { flight_number, status, departure_airport, arrival_airport, scheduled_departure, terminal, gate } |
read_file | path: absolute | The file as an embedded resource, its contents following the extension: .json, .md, .csv, anything else as plain text |
delete_file | path: absolute | { path, deleted }. Asks for confirmation first on 2026-07-28; nothing is really deleted |
send_email | to, subject, body | { message_id, to, status }. Nothing is really sent |
delete_file on 2026-07-28 answers its first call with
input_required and a form elicitation —
“Delete /tmp/old.log? This cannot be undone.” — and the retry completes or is cancelled according to the answer.
A client that does not declare form elicitation gets
-32021. Legacy revisions, which cannot ask, delete without asking,
leaving the confirmation to the client as the
destructiveHint annotation did in 2025.
See
Multi round-trip requests.
Failing on purpose
Each fake-world tool fails on one reserved value, so a test can reach every failure path without forcing anything. Failures are tool execution errors: isError: true with a message.
| Tool | Fails with | Message |
get_weather, get_forecast | city: "Atlantis" | City not found: Atlantis |
geocode | address: "Atlantis" | Address not found: Atlantis |
search_web | query: "error" | Search failed: the search backend is unavailable |
get_stock_price | symbol: "XXXX" | Unknown symbol: XXXX |
convert_currency | from or to: "XXX" | Unsupported currency: XXX |
get_user | user_id: "missing" | User not found: missing |
get_flight_status | flight_number: "XX000" | Flight not found: XX000 |
read_file, delete_file | path: "/missing" | File not found: /missing — and any path with .. is refused with Access denied |
send_email | to: "bounce@example.com" | Delivery failed: the mailbox bounce@example.com does not exist |
const result = await client.callTool({ name: "get_weather", arguments: { city: "Atlantis" } });
// { content: [{ type: "text", text: "City not found: Atlantis" }], isError: true }
For any other answer — a different error message, a protocol error, an HTTP failure — force it from the request. See Controlling answers.
Content types
Between them, the tools return every content type a tools/call result can carry, so a client's rendering of each one gets exercised.
| Content | From |
text | Every tool. Tools with structured content repeat it as JSON text, as the spec asks. |
structuredContent + outputSchema | Every tool except echo, color_swatch and read_file |
image | color_swatch — a valid PNG, base64-encoded |
resource_link | search_web, one per result |
embedded resource | read_file |
Older revisions get the catalog in their own vocabulary. 2025-03-26 has no outputSchema, structuredContent
or resource_link — the JSON text block remains and search_web's text keeps the URLs — and its
title moves into annotations.title. 2024-11-05 has neither annotations nor titles.
Resources
resources/list serves four fake files, and resources/templates/list three templates over the same world as the tools.
| URI | Type | What it is |
file:///etc/app/config.json | application/json | The application's configuration file |
file:///docs/README.md | text/markdown | The project's README |
file:///data/report.csv | text/csv | A small CSV report of scores |
file:///images/logo.png | image/png | A 16×16 PNG logo, read as a base64 blob |
| Template | Reads | Missing |
weather://{city} | The current weather, as get_weather reports it | weather://Atlantis |
user://{user_id} | A user profile, as get_user reports it | user://missing |
file:///{path} | Any file of the fake file system read_file serves | file:///missing |
await client.readResource({ uri: "weather://Madrid" });
// { contents: [{ uri: "weather://Madrid", mimeType: "application/json",
// text: "{\"city\":\"Madrid\",\"temperature\":14,…}" }] }
A missing resource is
-32002 up to 2025-11-25 and
-32602 from 2026-07-28, as each revision defines it.
On 2026-07-28 the list results and
resources/read carry cache hints (
ttlMs,
cacheScope),
and
resources/read requires the
Mcp-Name header. Subscriptions to these resources are covered in
Subscriptions.
Prompts
prompts/list and prompts/get serve three prompts. Unknown prompts and missing, unknown or non-string arguments are -32602.
| Prompt | Arguments | Asks for |
summarize | text, style?: brief · detailed | A summary of a text |
code_review | code, language? | A review of a piece of code |
weather_report | city | A short weather report, with the city's weather embedded as a resource. "Atlantis" is never found |
await client.getPrompt({ name: "weather_report", arguments: { city: "Madrid" } });
// { description: "A weather report for Madrid", messages: [
// { role: "user", content: { type: "text", text: "Write a short, friendly weather report for Madrid from this data:" } },
// { role: "user", content: { type: "resource", resource: { uri: "weather://Madrid", mimeType: "application/json", text: "…" } } } ] }
On 2026-07-28, prompts/get requires the Mcp-Name header. Before 2025-06-18, display titles are left out.