Skip to content

How a Model Picks a Tool

The model never sees MCP. The host turns each MCP tool into the model provider's own tool format and puts every definition in front of the model on every turn. The model chooses by reading names and descriptions, and answers with a structured request the host runs. So the description is what a server author should write with the most care.

View Markdown
On this page

Lesson 3 of 4 · 4 min

The Model Never Sees MCP

MCP is how the host talks to servers. The model talks to the host in its provider's API, which has its own way to describe tools. So before every request, the host translates: each MCP tool's name, description and inputSchema become an entry in the request's tools list. With Claude's Messages API, the schema field is called input_schema. Other providers use their own names for the same three things.

The model's answer comes back the same way, as a tool_use block in the provider's format rather than a JSON-RPC message, and the host turns it into a tools/call for the right server. Step through one choice below, using Homing's real ping definition.

Model

Host

MCP server

  1. 1 tools/list result

    The server describes its tools in MCP's format, once, when the host connects.

    {
      "name": "ping",
      "description": "Confirm this install reaches Homing and return your handle, …",
      "inputSchema": { "type": "object", "properties": {} }
    }
  2. 2 tools: [ … ]

    The host rewrites each tool in the provider's format and sends all of them with the conversation. Tool definitions come first in the prompt, ahead of the system prompt and the messages, and they're sent again on every turn.

    {
      "model": "…",
      "tools": [
        {
          "name": "ping",
          "description": "Confirm this install reaches Homing and return your handle, …",
          "input_schema": { "type": "object", "properties": {} }
        },
        …
      ],
      "messages": [{ "role": "user", "content": "Am I connected to Homing?" }]
    }
  3. 3 tool_use

    The model reads the descriptions, decides ping answers the question, and writes a tool_use block. The response stops with stop_reason: "tool_use": the model is waiting for a result.

    {
      "stop_reason": "tool_use",
      "content": [
        { "type": "tool_use", "id": "toolu_01…", "name": "ping", "input": {} }
      ]
    }
  4. 4 tools/call ping

    After your approval, the host maps the block to MCP: name stays, input becomes arguments.

    { "jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": { "name": "ping", "arguments": {} } }
  5. 5 result

    The MCP result, as in the previous lesson: content, structuredContent, isError.

  6. 6 tool_result

    Back into the provider's format, tied to the request by tool_use_id. A failed tool sets is_error, so the model knows to recover rather than report success.

    {
      "role": "user",
      "content": [
        { "type": "tool_result", "tool_use_id": "toolu_01…", "content": "{\"status\":\"ok\",\"handle\":\"ripley\",…}" }
      ]
    }

MCP shapes from the 2026-07-28 spec and Homing's server; model-side shapes from Claude's Messages API. Abridged.

What Makes a Model Pick One

The model has the name, the description and the schema, and nothing else. It can't read the code or the docs, and it remembers nothing from last week. A good description answers what a new colleague would ask: what the tool does, when to use it and when not to, what the arguments mean, and what comes back.

Compare a description that says only "Sends a message" with Homing's real one for send_message: "Deliver a message to a destination in your directory, or to the user's own inbox when to is omitted: a note to self lands there, never in an agent inbox, so an agent cannot read it back. … dry_run true returns a preview that names the recipient and delivers nothing. … message_id is a UUID per intended message; the same one again replays the first receipt instead of sending twice." The second tells the model when to leave to out. It also says how to preview and how to retry safely, and a name can't hold any of that.

Arguments get descriptions too, and they do as much work: to says "Destination handle from list_destinations; omit for your own inbox", which also tells the model which tool to call first.

Every Tool Costs Context

Every definition is resent on every turn, so a long tool list is paid for over and over, and it crowds the choice: twenty tools that sound alike are harder to choose between than five that don't. Measured on a sandbox on 2026-11-24, Homing's tools/list came to about 18 KB of JSON, most of it descriptions.

Hosts are starting to load definitions only when needed. The Claude API, for example, can mark tools defer_loading and give the model a search tool to find them. For a server author the advice doesn't change: fewer tools, distinct names, and descriptions that say when not to use them.

Hints and Instructions

A server can say more than descriptions. Annotations such as readOnlyHint and destructiveHint help a host decide when to ask you first, and the spec says to treat them as untrusted unless the server is. Instructions from the handshake or server/discover are standing rules the host can show the model, such as Homing's "Call send_message only after the user asked to send."

When the model still gets it wrong, the error text is the last thing the server can use to steer it. That's why Homing's errors say what to change, as in the Break It tab of the previous lesson.

Check Yourself

1What does the model actually receive about an MCP tool?

2When the model wants a tool, what does it produce?

3A model keeps calling send_message with a recipient when the user wanted a note to themselves. What fixes it best?

4Why does a server with sixty tools cost more than one with six, even when you only use one?

Questions

How does an LLM decide which MCP tool to call?

The host sends the model every tool's name, description and input schema in the provider's tool format. The model reads them alongside your message and, when one fits, answers with a structured tool-use request. The description is the main thing it goes on.

Does the model see the MCP protocol?

No. The host translates MCP tool definitions into the provider's tool format and translates the model's tool-use requests back into MCP tools/call messages.

Do MCP tool definitions use up context?

Yes. Tool definitions are part of every request the host sends to the model, so every tool costs context on every turn. Some hosts load definitions only when needed.

Try It

Read what your model reads. With a Homing key in HOMING_API_KEY, list each tool's name and the first line of its description, then measure the whole list.

1. Names and descriptions

curl -s https://api.tryhoming.com/mcp -X POST \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ -H "authorization: Bearer $HOMING_API_KEY" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \ | sed -n 's/^data: //p' | jq -r '.result.tools[] | "\(.name): \(.description | split("\n")[0])"'

2. Size of the whole list

curl -s https://api.tryhoming.com/mcp -X POST \ -H 'content-type: application/json' \ -H 'accept: application/json, text/event-stream' \ -H "authorization: Bearer $HOMING_API_KEY" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \ | sed -n 's/^data: //p' | wc -c

What You Should See

  • 1: one line per tool, starting with ping: Confirm this install reaches Homing….
  • 2: a byte count well over ten thousand. Almost all of it reaches the model on every turn.

Sources

Checked against the MCP specification 2026-07-28 and Homing's MCP server on 2026-11-25.

For Agents and Search Engines

This lesson is also plain Markdown for language models, listed in /llms.txt, and described in structured data as LearningResource, BreadcrumbList, FAQPage. Its sources are listed above. We last checked the lesson against them on 2026-11-25.

Put it to use

For Agents

Homing's tools, their descriptions and what each returns, written for the model that reads them.

Start with a note to yourself.

Works in Claude Code, ChatGPT, Codex, Gemini and other AI apps that can connect to Homing.

Connect an agent

Paste this into your agent.

Set me up with Homing in this session. Read https://tryhoming.com/setup-instructions.md and follow it. I'll sign in or set up a key when you ask.

Full Setup Guide

Step by step: Claude CodeCodexGeminiMore…