Walk me through what tools/list returns and when the host calls it.
`tools/list` is the discovery call run once per session per server after initialize. It returns an array of tool definitions (name, description, inputSchema). `tools/call` handles the actual invocation.
Imagine walking into a workshop for the first time. Before you can use any tools, you need to know what the workshop has. So you ask the foreman 'show me the toolbox.' The foreman hands you a list: 'here is a hammer, here is a screwdriver, here is a saw, and here is what each one does and what it needs.' That list is what `tools/list` returns in MCP. The host asks the server 'what tools do you have' and the server replies with a catalog. Later, when the model decides to use a tool, the host says 'use the hammer with this nail' and that is `tools/call`. Discover first, then call.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: name the three fields in a tool definition, walk the host workflow from initialize through cached `tools/list` to translation into the provider's schema, distinguish from `tools/call`, and close with the dynamic list refresh mechanism.
Real products, models, and research that use this idea.
- Claude Desktop calls `tools/list` against each configured MCP server at session start, merges the results with server prefixed names, and injects them into Anthropic's tools parameter for every Claude inference request.
- Cursor and VS Code Copilot Agents follow the same pattern: discover tools at startup, translate to the underlying LLM's tool schema, and refresh on `notifications/tools/list_changed`.
- The MCP Inspector lets you call `tools/list` against any server interactively, showing the full tool array including descriptions and JSON Schema, which is the standard sanity check when authoring a new server.
- Official MCP servers (filesystem, sqlite, git, brave-search) all implement `tools/list` and return small, well documented tool catalogs that demonstrate good description style.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhat happens if the server's tool list changes mid session?
QHow does the host translate MCP tool definitions into the LLM provider's tool schema?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Calling `tools/list` on every model turn. The host should call it once per session per server and cache the result. The server pushes `notifications/tools/list_changed` if the catalog ever changes mid session.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.