AI Briefing
KO

How to Write Effective Tools for Agents: Working with Agents

·2025.09.11 00:00

Key point

MCP tools should be rapidly improved through prototyping, evaluation, and collaboration with Claude Code.

1 / 2

Details

Model Context Protocol (MCP) tools let LLM agents perform complex real-world tasks, but performance depends heavily on tool design. The key is not to simply build a tool like an API, but to make it something agents can actually use well.

First, quickly build a prototype and use it locally yourself to find rough edges. You can test it by hooking it up to Claude Code, Claude Desktop, or the Anthropic API, and it's best to provide LLM-friendly documentation alongside your docs and SDKs wherever possible.

Next comes evaluation. Create many realistic tasks drawn from actual work, and group them into prompt-response pairs that can be verified for correctness to measure performance. The author recommends looking not just at simple accuracy but also at number of tool calls, runtime, token usage, and error rate.

When reading evaluation results, don't just look at what the agent said—check the full transcript and tool responses as well. You need to identify issues such as ambiguous tool descriptions, confusing schemas, unnecessary calls, or incorrectly populated parameters.

After that, refine the tools again together with an agent like Claude Code. Some particularly important principles are as follows.

  • Only build tools that are truly necessary: Prioritize high-value tasks the agent can use directly, such as search, booking, or context aggregation, over simple wrappers.
  • Use namespacing to make boundaries clear: Too many similar tools blurs the agent's strategy.
  • Return meaningful context: Provide relevant information along with results so the agent can decide its next action.
  • Improve token efficiency: Reduce verbose output and redundant information.
  • Polish tool descriptions and specs like prompts: The name, description, and examples determine the quality of calls.

Ultimately, a good tool isn't just one that works—it's one that makes it easy for the agent to find a successful strategy. The more you repeat the prototype-evaluate-refine loop, the more naturally the tool's performance aligns for both humans and agents.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.