1:1 Mentoring with Big Tech AI Engineers
RAG & MCP

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

Tool Discovery 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:

Continue Reading

This topic continues with more in-depth content, code examples, and diagrams. Sign up free to unlock the full guide with all 87 sections.

Sign Up Free to Unlock

Free access · No credit card required

More in RAG & MCP

Get full access to all 87 sections with code examples, diagrams, and interactive animations.

Sign Up Free