MCP 2025-11-25 · LOCAL REGISTRY

MCP tool registry: discovery through execution

Run fixed local tools and inspect schema changes, stale discovery and exact-name dispatch.

Server registry and client discovery

Client catalog

Inspect and execute a discovered tool

Cached input schema

Latest local outcome

Current server registry
Protocol message log (last 40 messages)
Complete state evidence

Explore a registry that can execute its tools

This direct inspector has a local server registry, a separate client catalog, two fixed JavaScript functions and concrete input schemas. It emits MCP-shaped initialize, tools/list and tools/call objects for inspection but makes no network requests. The session is pinned to MCP revision 2025-11-25 and advertises tools.listChanged. Tool names select exact registry entries; a natural-language keyword score cannot accidentally select a function. Initialization and the ready notification are recorded before initial discovery.

Read the discovered schema before calling

Discovered tool selects a name from the client catalog and displays the exact cached input schema. Tool arguments is editable JSON. Load example fills arguments appropriate to that cached schema; it does not execute them. Execute locally parses the object, sends a simulated call and computes the function against the current server schema. At defaults, sum accepts a and b, each between minus and plus one million, with no extra fields. Two and three return five. Try negative four and ten to obtain six. The result contains readable text and a structured value.

Reproduce a stale schema failure

Disable Refresh after change notifications. Change Server sum schema from Two numbers to Number list. The server catalog generation advances, but the client still describes a and b. These generation counters are local teaching annotations, not MCP wire fields. Execute the old example: the server reports missing values and unexpected a and b as a tool error. Click Refresh client catalog to issue a new tools/list exchange. Load example now produces values of two, three and four; Execute locally returns nine. No automatic conversion hides the incompatibility.

Observe notification-driven discovery

With Refresh after change notifications enabled, a later server mutation records notifications/tools/list_changed and immediately fetches the current list. The notification has no ID and receives no response. A fresh list is returned in response to a distinct tools/list request. Enabling automatic refresh after a change has already been missed does not retroactively fetch anything; use Refresh client catalog or make another mutation. Automatic refresh preserves the argument editor, so an old argument shape can still fail even with a current catalog. Load example deliberately updates it.

Remove a tool while a client still knows its name

Select uppercase, load its example and execute to convert Straße to STRASSE while preserving the emoji. Disable automatic refresh, then clear Register uppercase. The stale client still offers uppercase, but the server no longer has that exact name. Execution returns a protocol error with code -32602 and does not run a function. Refresh removes the stale option and selects the remaining sum tool. Register uppercase again with automatic refresh enabled to restore discovery. Registration here toggles a prewritten local function; it cannot install code or grant access to external services.

Test schema and editor boundaries

Sum Number list requires one through eight numeric values in the same million-unit bounds. An empty list, a ninth item or a numeric string produces a tool error and no successful execution. Uppercase requires text of at most one hundred twenty-eight Unicode code points; extra properties are rejected. The schema checker implements only these fixed object, number, string and array constraints. It is not a complete JSON Schema validator. Malformed JSON or a non-object fails in the editor and sends no request. Valid JSON with invalid tool arguments is sent and returns result.isError=true. Unknown tools instead produce a JSON-RPC error envelope.

Interpret the evidence and reset precisely

The client catalog, selected schema, current server registry and message log are available as text. Sent calls includes server-rejected requests; successful local executions counts only completed computations. Input edits clear the previous result so it cannot be mistaken for a fresh answer. Refresh fetches the catalog without executing a function. Reset session restores the two-number schema, uppercase registration, automatic refresh, default arguments, IDs and counters. The log retains its most recent forty messages to bound the page. This is an immediate computational tool, so it has no invented playback, pause or speed control.

Keep the experiment bounded

The list fits in one response and has no pagination. The lab omits authentication, grants, concurrent mutations, task extensions, transport failures and language-model tool choice. Descriptions are untrusted metadata in a real integration, never authorization. All rendering here uses text rather than executable markup. Arithmetic uses JavaScript numbers and may round decimals; uppercase uses the runtime Unicode mapping rather than locale-specific casing. Use the registry and message views to reproduce a boundary, then test an actual server and client separately before claiming production interoperability.

Protocol reference: MCP 2025-11-25 tools, discovery and error handling.

Views are my own and do not represent any employer, past or present.

Search