MCP Discovery
MCP tool discovery and capability negotiation: how clients discover server capabilities and tools dynamically.
Last updated
4.4 — How the LLM Discovers and Selects MCP Tools
This is the most common interview question about MCP: "How does the model know which tool to use?" The answer involves three stages.
Stage 1: Discovery — tools/list at Connection Time
Stage 2: Schema Injection — Tools Become Part of the Prompt
The MCP client (Claude Desktop, your app) takes every discovered tool schema and injects them into the API call to the LLM. Here's what the LLM actually sees in its system prompt: