Vibeleaderboard
← All Intel
Intel / article

Writing Tools For Agents

Source
anthropic.com
Publisher
Anthropic
Author
Anthropic research
Date
Why it matters

Shows how to prototype tools, build evals around them, and have Claude Code optimize them. Covers namespacing, token-efficient responses and description prompt-engineering, which determine how reliably agents use your tools.

Key takeaways · AI-distilled
  • Anthropic recommends a few targeted tools for high-impact workflows over wrapping every API endpoint: a search_contacts tool rather than list_contacts, because an agent that reads every returned spends its limited on irrelevant data.
  • Evaluation tasks should mirror real work and may need dozens of tool calls. Anthropic contrasts a strong task (investigate a triple charge for customer 9182 and check whether others were hit) with weak ones that spell out the exact query to run.
  • Anthropic reports that resolving opaque UUIDs to meaningful names, or even a 0-indexed ID scheme, significantly improved Claude's precision by reducing hallucinations. A response_format enum lets the agent pick concise or detailed output.
  • Claude Code caps tool responses at 25,000 tokens by default. The post advises pagination, filtering or truncation with sensible defaults, and error messages that tell the agent how to fix the call instead of opaque codes or tracebacks.
  • Small description edits had large effects: Anthropic says precise tool-description refinements helped Claude Sonnet 3.5 reach state of the art on , and a fixed description stopped Claude appending 2025 to web search queries.
Terms in this piece · Glossary
  • Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
  • Record — One unit of data in a file or table, such as one supplier's quote; distinct from a line of text.
  • Retrieval — Selecting evidence relevant to the current request.
  • SWE-bench — The standard benchmark for AI coding agents: real GitHub issues from real repositories, scored by whether the agent's patch passes the project's own tests.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

Read the source www.anthropic.com
More from Anthropic research
Recommended reads