Skip to content

[FEATURE] Support for Anthropic advanced tool use #1349

@rjesh-git

Description

@rjesh-git

Problem Statement

Problem Statement

Support for Anthropic's advanced tool use features released in November 2024. These features enable agents to work with large tool libraries more efficiently and handle complex workflows that aren't feasible with traditional tool calling patterns.

capabilities:

  • Tool Search Tool: Allows agents to discover and load tools on-demand instead of loading all tool definitions upfront, reducing token consumption by up to 85%
  • Programmatic Tool Calling: Enables agents to orchestrate tools through code execution, keeping intermediate results out of context and reducing latency
  • Tool Use Examples: Provides a standard way to demonstrate correct tool usage patterns beyond JSON schema definitions

Proposed Solution

Add support for Anthropic's advanced tool use beta features to the SDK:

  1. Implement Tool Search Tool support with defer_loading parameter for tool definitions
  2. Add Programmatic Tool Calling with allowed_callers configuration for code execution integration
  3. Support input_examples field in tool definitions for Tool Use Examples
  4. Include the beta header advanced-tool-use-2025-11-20 when these features are enabled

Use Case

Enables building production-grade agents that can:

  • Work with hundreds or thousands of tools without context window overflow
  • Process large datasets efficiently by keeping intermediate results out of context
  • Achieve higher accuracy through concrete usage examples
  • Reduce latency by orchestrating multiple tool calls in code rather than through individual API round-trips

Alternatives Solutions

No response

Additional Context

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions