Skip to main content
The Anthropic provider wraps Composio tools in the format expected by Claude’s tool use API.

Installation

Quick Start

Complete Example

Tool Caching

Enable ephemeral caching to reduce costs:

handleToolCalls()

Automatically execute tool calls from Claude’s response:

Tool Format

The Anthropic provider wraps tools in this format:

Streaming

Best Practices

  1. Tool Caching: Enable caching for cost savings
  2. Max Tokens: Set appropriate max_tokens for tool responses
  3. Error Handling: Handle tool execution errors
  4. Prompt Design: Craft clear system prompts
  5. Stop Reasons: Check stop_reason for tool_use

TypeScript Types

Differences from OpenAI

Next Steps

OpenAI Provider

Compare with OpenAI

Tools API

Learn about tools

Connected Accounts

Set up authentication

Examples

View examples