Test the connection before the model

tools testing

When an agent cannot use a tool, separate three questions: did the server speak the protocol, did the model choose the right tool, and did the tool perform the intended action?

Inspect the protocol surface

MCP (Model Context Protocol) lets a client discover and call tools exposed by a server. A stdio server exchanges these messages over standard input and output. With mcpprobe installed and a server executable you intend to run:

mcpprobe -json -- ./example-server

The probe launches the server, checks the protocol conversation and reports names, codes and sizes. It does not invoke real tools. A process that starts but exposes an invalid surface can therefore fail before an agent enters the picture.

The child program still executes its normal startup behavior.

Worked scenario

A tool disappears after a server change. First compare the exposed names and schemas with the caller's expectations. If discovery fails, investigate transport and server registration. If discovery succeeds but the model never selects the tool, investigate the selection context. If selection succeeds but the operation fails, inspect the tool's inputs and result.

After discovery works, test the intended operation with representative inputs.

Documentation has a boundary too

docstale checks whether cited paths, symbols, line numbers and links still resolve. External link fetching is opt-in. It can find a deleted function cited by a guide, but a surviving function may have changed behavior. Read the surrounding explanation when the cited behavior changes.

That distinction motivates the mutation-testing note: deliberately break a promised property and see whether its test notices. Keep unit tests, protocol checks, hardware runs and user-level evaluations distinct in the record.

Return to the Tool Chest or the Laboratory.