Showing posts with label Claude Code. Show all posts
Showing posts with label Claude Code. Show all posts

12.9.25

How to Build High-Quality Tools for LLM Agents — Lessons from Anthropic

 As agents become more central to AI workflows, what separates a good agent from a great one often comes down to the tools it has—and how well those tools are designed. In “Writing effective tools for agents — with agents,” Anthropic shares a practical roadmap for building better tools powered by tools themselves, using Claude and the Model Context Protocol (MCP) as real-use labs.


What are “tools” in the agentic context?

Unlike conventional software APIs—deterministic functions that always give the same output for the same input—tools for agents must be built to coexist with non-deterministic systems. Agents like Claude must decide when to use tools, how to parse their output, and how to call them responsibly. A tool here is not just an API call; it's part of an interface contract between predictable software and unpredictable agent behavior. Tools are the mechanisms by which agents expand what they can reliably do. 


Key workflows: prototyping, evaluating, and iterating

Anthropic emphasizes an iterative workflow:

  1. Prototype early: Build simple versions of your tools. Use MCP servers or desktop extensions to connect your tool to Claude Code, allowing rapid experimentation and detection of rough edges. Include clear documentation that the agent can consume. 

  2. Run realistic evaluations: Create evaluation tasks that reflect real-world usage (multiple tool calls, complex chains, integration with other services). Use verifiable outcomes, not just “it seems right.” Capture metrics such as tool calls, token consumption, runtime, errors. Avoid toy tasks that underrepresent complexity. 

  3. Use agents to improve tools: Let Claude analyze transcripts and feedback to suggest refinements—maybe better prompt descriptions, more efficient tool outputs, clearer schemas. Anthropic reports improvements even for tools built by internal experts, purely by letting agents inspect tools’ performance. 


Best practices and guiding principles

Anthropic distills the lessons into a set of design principles. Key among them:

  • Choosing tools selectively: Not every API needs to become a tool. Tools should cover high-impact, repeated workflows—not wrapping every possible existing endpoint. Also, consolidate when possible. 

  • Namespaces and naming clarity: Clear, consistent naming helps agents pick the right tool. Avoid ambiguous names or overlapping functionality. Group related tools under logical prefixes or categories. 

  • Return meaningful, concise context: Tools should return high-signal info. Avoid overwhelming the agent with technical IDs, long metadata unless necessary. Also allow “concise” vs “detailed” response modes. 

  • Optimize for token efficiency: Use truncation, filtering, pagination. Prompt agents to use fewer tool calls or more precise queries. Efficient context limits make downstream tasks more reliable. 

  • Clear tool specs and descriptions: Explicit parameter naming, clear input/output formats, good examples. Prompt engineering of tool descriptions can significantly impact performance. 


Why this matters

Tools shape what agents can do. When tools are poorly described, overly broad, or return huge dumps of irrelevant context, agents waste resources, produce hallucinations, or fail to successfully orchestrate workflows. On the other hand, well-designed tools reduce ambiguity, reduce token use, reduce error, and let agents scale reliably across real-world tasks.

Especially as agents connect to many tools (hundreds via MCP servers), these design principles become the difference between brittle behavior and something that feels reliable and intuitive. Anthropic’s experience shows that many improvements come not from changing the LLM itself but refining the tools around it.


If you’re building agent tools or service/tool APIs for agents, following Anthropic’s workflow—prototype → evaluate → iterate—and using clear naming, context-efficient returns, and good documentation will set you up for tools agents actually use well.

Link: https://www.anthropic.com/engineering/writing-tools-for-agents

21.6.25

Anthropic Empowers Claude Code with Remote MCP Integration for Streamlined Dev Workflows

 Anthropic Enhances Claude Code with Support for Remote MCP Servers

Anthropic has announced a significant upgrade to Claude Code, enabling seamless integration with remote MCP (Model Context Protocol) servers. This feature empowers developers to access and interact with contextual information from their favorite tools—such as Sentry and Linear—directly within their coding environment, without the need to manage local server infrastructure.


🔗 Streamlined, Integrated Development Experience

With remote MCP support, Claude Code can connect to third-party services hosting MCP servers, enabling developers to:

  • Fetch real-time context from tools like Sentry (error logs, stack traces) or Linear (project issues, ticket status)

  • Maintain workflow continuity, reducing context switching between IDE tab and external dashboards

  • Take actions directly from the terminal, such as triaging issues or reviewing project status

As Tom Moor, Head of Engineering at Linear, explains:

“With structured, real-time context from Linear, Claude Code can pull in issue details and project status—engineers can now stay in flow when moving between planning, writing code, and managing issues. Fewer tabs, less copy-paste. Better software, faster.” 


⚙️ Low Maintenance + High Security

Remote MCP integrations offer development teams a hassle-free setup:

  • Zero local setup, requiring only the vendor’s server URL

  • Vendors manage scaling, maintenance, and uptime

  • Built-in OAuth support means no shared API keys—just secure, vendor-hosted access without credential management 


🚀 Why This Empowers Dev Teams

  • Increased Productivity: Uninterrupted workflow with real-time insights, fewer context switches

  • Fewer Errors: Developers can debug and trace issues precisely without leaving the code editor

  • Consistency: OAuth integration ensures secure, standardized access across tools


🧭 Getting Started

Remote MCP server support is available now in Claude Code. Developers can explore:

  • Featured integrations like Sentry and Linear MCP

  • Official documentation and an MCP directory listing recommended remote servers 


✅ Final Takeaway

By enabling remote MCP server integration, Anthropic deepens Claude Code’s role as a next-gen development interface—bringing tool-derived context, security, and actionability into the coding environment. This update brings developers closer to a unified workflow, enhances debugging capabilities, and accelerates productivity with minimal overhead.

What Claude offers now From Anthropic’s announcements: Creates and edits real files directly in chats or the desktop app: Excel (.xlsx)...