Agents, Tool Use & MCP·Question 10 of 90BasicAI-75

What makes a good tool definition? Give concrete design rules.

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

A good tool is one a model reliably picks correctly and calls correctly under ambiguity. Rules that matter in practice:

  • Few and distinct. Every tool competes for the model's attention and context budget. Overlapping tools (search, find, lookup) cause wrong-tool selections. If two tools are confusable to a smart colleague reading only names and descriptions, merge or rename them.
  • Names are UI. jira_create_issue beats createIssue2. Namespacing by service prevents cross-service confusion when tool counts grow.
  • Descriptions are prompts - write them like onboarding docs. What it does, when to use it, when not to use it, what each argument means (formats, units, defaults), and one example. "Searches internal docs. Use for company-policy questions; do NOT use for general web queries" measurably outperforms "Searches documents."
  • Schemas that constrain. Enums over free strings, required vs optional made explicit, formats specified. The less the model has to guess, the fewer fabricated arguments.
  • Match tools to intents, not endpoints. Wrapping every REST endpoint 1:1 pushes API complexity onto the model. schedule_meeting(attendees, duration) beats a three-call chain the model must sequence itself.
  • Token-efficient, high-signal outputs. Results live in context for the rest of the trajectory. Return names and semantic IDs rather than UUID soup, paginate, support a concise/detailed response format.
  • Actionable errors. "Invalid status: valid values are open, closed, merged" lets the model self-correct; a stack trace doesn't.
  • Evaluate with transcripts. Run realistic tasks, read where the model misuses tools, fix the descriptions - treat tool docs as tuned artifacts, not static code comments. This is the core of Anthropic's Writing effective tools for agents guidance.
Full worked answer

A good tool is one a model reliably picks correctly and calls correctly under ambiguity. Rules that matter in practice:

  • Few and distinct. Every tool competes for the model's attention and context budget. Overlapping tools (search, find, lookup) cause wrong-tool selections. If two tools are confusable to a smart colleague reading only names and descriptions, merge or rename them.
  • Names are UI. jira_create_issue beats createIssue2. Namespacing by service prevents cross-service confusion when tool counts grow.
  • Descriptions are prompts - write them like onboarding docs. What it does, when to use it, when not to use it, what each argument means (formats, units, defaults), and one example. "Searches internal docs. Use for company-policy questions; do NOT use for general web queries" measurably outperforms "Searches documents."
  • Schemas that constrain. Enums over free strings, required vs optional made explicit, formats specified. The less the model has to guess, the fewer fabricated arguments.
  • Match tools to intents, not endpoints. Wrapping every REST endpoint 1:1 pushes API complexity onto the model. schedule_meeting(attendees, duration) beats a three-call chain the model must sequence itself.
  • Token-efficient, high-signal outputs. Results live in context for the rest of the trajectory. Return names and semantic IDs rather than UUID soup, paginate, support a concise/detailed response format.
  • Actionable errors. "Invalid status: valid values are open, closed, merged" lets the model self-correct; a stack trace doesn't.
  • Evaluate with transcripts. Run realistic tasks, read where the model misuses tools, fix the descriptions - treat tool docs as tuned artifacts, not static code comments. This is the core of Anthropic's Writing effective tools for agents guidance.

What a good answer covers

  • A good tool is one a model reliably picks correctly and calls correctly under ambiguity
  • Few and distinct
  • Names are UI
  • Descriptions are prompts - write them like onboarding docs
  • Schemas that constrain

Key terms: Few and distinct · Names are UI · Schemas that constrain · Token-efficient, high-signal outputs · Actionable errors · Evaluate with transcripts

Interviewer follow-ups to expect

  1. How would you detect that two tools are being confused in production?

  2. Your tool count just hit 40 - what do you do?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep