Domain 218% weight

Quick Reference: Domain 2Tool Design & MCP Integration

Tool Schema Best Practices

Tool schemas are the primary signal Claude uses for tool selection. Name, description, and parameter descriptions matter more than implementation.

RuleDetails
Clear tool namesUse verb_noun format: search_documents, create_ticket
Describe every parameterClaude cannot see defaults — describe what happens if omitted
Constrain with enumsUse enum arrays for parameters with known valid values
Mark required fieldsAlways explicitly list required parameters in the schema
Avoid deep nestingFlat schemas are easier for Claude to fill correctly
Anti-PatternWhy It Fails
Generic tool names (do_action, process)Claude cannot distinguish between similarly vague tools
Missing parameter descriptionsClaude guesses wrong values or skips optional params
Too many tools (>15-20)Tool selection accuracy drops — consolidate or use routing
Overlapping tool purposesClaude picks randomly between similar tools

MCP Architecture

MCP follows a client-server architecture. Servers expose three capability types:

CapabilityPurposeExample
ToolsExecutable actionssearch_database, send_email
ResourcesRead-only data accessfile://docs/readme.md, db://users/123
PromptsReusable prompt templatescode_review, summarize_document

Transports: stdio for local processes (default), HTTP+SSE for remote servers.

Tool Error Handling

Never throw unhandled exceptions from tools. Return structured errors with is_error: true so Claude can reason about the failure and attempt recovery.

Include actionable context: what failed, why, and what the user or Claude could try differently.

Tool Selection Strategy

When Claude has many tools available, selection accuracy depends on: (1) distinctness of tool names and descriptions, (2) system prompt guidance about when to use which tool, and (3) keeping the total tool count manageable.

Key rule: If you have more than 15-20 tools, consider routing to specialized agents with smaller tool sets.