Claude Partner Certificate — 2 · Tool Design & MCP
CC — 04

Domain 2 · Tool Design & MCP Integration

This domain is about the tools Claude calls: how to describe them, how they report errors, how many each agent should get, how MCP servers are configured, and which built-in tool fits which job.

Read time10 min
Exam weight18%
Tasks2.1 to 2.5
SectionClaude Partner Certificate

Videos: Ep 06 to Ep 09

Key terms: Tool: an action Claude can request. MCP (Model Context Protocol): a standard way for programs to offer tools and data to Claude. MCP server: a program that provides those tools. Built-in tools: the ready-made tools in Claude Code (Read, Write, Edit, Bash, Grep, Glob).

01 — task 2.1

2.1 Design effective tool interfaces with clear descriptions and boundaries

What it is: Claude chooses a tool by reading its name and description, so those words are the only guide it has. If two tools sound alike, or a description is one vague line, Claude will pick the wrong one. A good description says what the tool does, when to use it, when not to, and what it returns.

The exam tests: how descriptions drive tool selection, and how to fix a tool that is called wrongly. Video: Ep 06.

Troubleshoot misrouting in this order

flowchart TB A["1. Rewrite descriptions with boundaries"] --> B["2. Rename and split overlapping or generic tools"] B --> C["3. Review system prompt wording for tool bias"] C --> D["4. Add few-shot examples, only if still needed"]

Full notes

Rule: Tool descriptions are the main way the model chooses a tool. Minimal descriptions make the choice between similar tools unreliable.

Rule: A strong description says what the tool does, when to call it, what it must not be used for, and what it returns. Add input formats, example queries and edge cases.

Rule: Overlapping descriptions cause misrouting, for example analyze_content next to analyze_document. Rename the tools and rewrite the descriptions to remove the overlap, or split a generic tool into purpose-specific ones with clear input and output contracts.

Rule: A vague role line in the system prompt can bias tool choice. Keep the system prompt and the tool descriptions aligned.

✗
Trap
Reaching for few-shot examples, a routing layer or tool consolidation before fixing thin descriptions. Descriptions are the root cause and the cheapest fix, so they come first.

Deep dive

02 — task 2.2

2.2 Implement structured error responses for MCP tools

What it is: When a tool fails, it should tell Claude what kind of failure it was and whether trying again can help. MCP uses an isError flag to mark a failed call, and you add details such as the error category and whether it is retryable. A bare "Operation failed" leaves Claude guessing.

The exam tests: how a tool reports failure, and how structured errors let the agent choose a recovery. Video: Ep 07.

json
{ "tool_result": {
    "isError": true,
    "content": [...]
  }
}
Failure typeExampleRetryable?
TransientTimeout, network glitchSometimes
ValidationWrong inputSometimes
BusinessOutside refund policyNever
PermissionNot authorizedNever

Full notes

Rule: The MCP isError flag tells the agent a tool call failed.

Rule: Return structured metadata: an errorCategory (transient, validation or permission), an isRetryable boolean, and a readable description. For a business-rule violation, add retriable: false and a customer-friendly explanation.

Rule: Subagents recover from transient failures themselves. They pass up only what they cannot resolve, together with what was attempted and any partial results.

Rule: An access failure needs a retry decision. A valid empty result means the query worked and found nothing.

✗
Trap
A generic "Operation failed" message, which hides the information the agent needs. Also wrong: reporting an empty success to hide a failure, or ending the whole pipeline on one failure.

Deep dive

03 — task 2.3

2.3 Distribute tools appropriately across agents and configure tool choice

What it is: Every tool you give an agent is one more option Claude has to choose from, so too many tools, or tools outside the agent's job, lead to wrong picks. tool_choice is a setting that controls how much freedom Claude has: auto lets it answer in plain text or use a tool, any forces it to use some tool, and a forced tool makes it use one specific tool.

The exam tests: how many tools an agent should have, which ones, and what tool_choice guarantees. Video: Ep 07.

tool_choice: how much freedom Claude has

SettingWhat happens
"auto"The model decides. It may reply in plain text or call a tool
"any"The model must call a tool, and chooses which one. No text-only replies. This guarantees structured output when the document type is unknown
Forced toolThe model must call the named tool, for example {"type": "tool", "name": "extract_metadata"} first

Full notes

Rule: Too many tools degrade selection. The guide's example is 18 tools instead of 4 or 5.

Rule: An agent given tools outside its specialty misuses them, for example a synthesis agent attempting web searches. Give each agent only what its role needs.

Rule: A narrow cross-role tool is fine for a frequent need, such as a verify_fact tool for the synthesis agent. Complex cases still go through the coordinator.

Rule: Replace a broad tool with a constrained one, such as load_document, which validates document URLs, instead of a general fetch_url.

Rule: With tool_choice set to "auto", Claude may answer in text. With "any", it must call a tool but chooses which, which guarantees structured output. With a forced tool, a named tool runs first (for example extract_metadata before enrichment), and later steps follow in further turns.

✗
Trap
Giving every agent the full tool set.

Deep dive

04 — task 2.4

2.4 Integrate MCP servers into Claude Code and agent workflows

What it is: MCP servers are separate programs that offer tools and data to Claude through a standard protocol. A settings file tells Claude Code which servers to connect to: a project file shared with the team, or a personal file only you use. Secrets such as tokens are kept out of the file by pointing to environment variables.

Why use MCP?

  • New tools can be discovered at runtime.
  • One server can be reused across agents and apps.
  • Tool descriptions and metadata help Claude understand what each tool does.
  • It separates concerns: the host runs the agent, the client speaks the protocol, and the server provides the tools.
Server typeHow it runs
Local (stdio)Runs on your machine and is used like a function
RemoteReached over HTTP and SSE

The exam tests: where MCP servers are configured, how secrets are kept out of the repo, and what MCP resources are for. Video: Ep 08.

A host reaches a server through an MCP client

flowchart LR H["HOST<br/>AI environment and agent logic"] --> C["MCP CLIENT<br/>implements the protocol, handles connect and initialize"] C --> S["MCP SERVER<br/>exposes tools, resources and prompts, runs remote operations"]

Agent communication with MCP runs in six steps:

flowchart LR A["Connect"] --> B["Initialize"] --> C["Discover"] --> D["Reason"] --> E["Call"] --> F["Respond"]
.mcp.json~/.claude.json
ScopeProjectPersonal / user
LocationRepo rootHome directory
SharingCommittedNever shared
Use forTeam-wide toolsPersonal and experimental servers

Full notes

Rule: Put shared servers in the project's .mcp.json. Put personal or experimental ones in ~/.claude.json.

Rule: Use environment variable expansion, such as ${GITHUB_TOKEN}, so credentials are never committed.

Rule: Tools from every configured MCP server are discovered when Claude connects, and all are available at the same time.

Rule: MCP resources expose content catalogs (issue summaries, documentation hierarchies, database schemas), so the agent makes fewer exploratory tool calls.

Rule: Write detailed MCP tool descriptions. Otherwise the agent may prefer a built-in tool such as Grep over a more capable MCP tool.

Rule: Prefer an existing community MCP server for a standard integration like Jira. Keep custom servers for team-specific workflows.

✗
Trap
Putting a team server in the user-level file, so teammates never receive it.

Deep dive

05 — task 2.5

2.5 Select and apply built-in tools (Read, Write, Edit, Bash, Grep, Glob)

What it is: Claude Code and agents built with the Agent SDK come with a few ready-made tools. Read opens a file, Write creates or replaces one, Edit changes a specific piece of text, Bash runs a command, Grep searches inside files, and Glob finds files by name. Choosing the right one, and exploring step by step, keeps the work fast and accurate.

The exam tests: which built-in tool fits which job, and how to explore a codebase step by step. Video: Ep 09.

Discover, understand, create, fix: one tool per step

flowchart LR A["1. Discovery<br/>Glob: map out the folder structure"] --> B["2. Understanding<br/>Grep, then Read: pinpoint functions, then load them"] B --> C["3. Create<br/>Write: generate new boilerplate endpoints"] C --> D["4. Fix<br/>Edit: patch legacy issues"]

Incremental exploration loads only what you need: Grep, then Read the target, then trace the dependency, and repeat.

ToolJob
ReadLoads a full file
WriteCreates or overwrites a file
EditTargeted change using unique text matching
BashRuns shell commands
GrepSearches file contents
GlobFinds files by path pattern

Full notes

Rule: Use Grep to search inside files (function names, error messages, imports). Use Glob to find files by name pattern, such as **/*.test.tsx.

Rule: Edit needs a unique piece of text to match. When it fails because the text is not unique, fall back to Read followed by Write.

Rule: Build understanding step by step. Grep for entry points, then Read to follow imports and trace the flow.

Rule: To trace usage through wrapper modules, list the exported names first, then search for each name across the codebase.

✗
Trap
Reading every file up front instead of exploring incrementally.

Deep dive