Convert a tool-like object to an Anthropic tool definition.
convert_to_anthropic_tool(
tool: Mapping[str, Any] | type | Callable | BaseTool,
*,
strict: bool | None = None
) -> AnthropicTool| Name | Type | Description |
|---|---|---|
tool* | Mapping[str, Any] | type | Callable | BaseTool | A tool-like object to convert. Can be an Anthropic tool dict,
a Pydantic model, a function, or a |
strict | bool | None | Default: NoneIf Note Requires Claude Sonnet 4.5 or Opus 4.1. |