Domain 2 · Lesson 1 · Tool Design & MCP (18%)

Designing Tool Interfaces

Task Statement 2.1 — the description IS the interface, and how overlap causes misrouting.

Course progress: Domain 2 ▸ lesson 1 of ~4

The model does not read your code. It reads your tool descriptions. Those descriptions are the primary — often the only — signal it uses to pick a tool. Weak descriptions are the number-one cause of tool-selection failures.

What a good description contains

"Retrieves order details" is a distractor-grade description. A production description states:

Root-cause rule When two similar tools get confused (e.g., get_customer vs lookup_order, both "Retrieves … information"), the correct first step is to expand the descriptions to differentiate purpose, inputs, and boundaries — not to add a routing layer, not to consolidate tools, and not (as a first move) to add few-shot examples.

Why not the other options?

Tempting fixWhy it's not the first step
Add few-shot examples of correct routingAdds token overhead without fixing the root cause (thin descriptions). A later refinement, not the first lever.
Build a routing layer that pre-selects tools by keywordOver-engineered; bypasses the LLM's own language understanding.
Consolidate into one lookup_entity toolValid architecture eventually, but heavier than a "first step" when the real problem is inadequate descriptions.

Splitting vs renaming

Two structural techniques the exam expects you to apply:

Watch the system prompt too

Subtle trap Keyword-sensitive system-prompt wording can override even a well-written tool description. If the prompt says "when users mention documents, analyze them," it may create an unintended association pulling calls to the wrong tool. Review the system prompt for keyword coupling as part of debugging tool selection.

Check yourself

Two tools with minimal near-identical descriptions get confused on ambiguous requests. The most effective first step is to:
Correct: option 1. Descriptions are the primary selection signal; thin descriptions are the root cause, and expanding them is the low-effort, high-leverage first fix. Few-shot (2) is overhead without fixing the cause; a routing layer (3) is over-engineered; consolidation (4) is heavier than a first step warrants.
A generic analyze_document tool is used inconsistently for extraction, summarization, and verification. The cleanest structural fix is to:
Correct: option 2. Splitting a generic tool into specific tools (extract / summarize / verify) with clear contracts removes ambiguity at the selection layer. A mode param keeps the ambiguity inside one description; forcing order and inlining don't address selection clarity.
Decision rules Tool confusion → fix descriptions first. Persistent overlap → rename/re-describe or split into specific tools. Still misrouting → audit system prompt for keyword coupling.
Ask your teacher. Want a worked before/after of a bad vs good tool description? Ask.