AnthropicTool Class — langchain Architecture
Architecture documentation for the AnthropicTool class in chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9a4060af_4e19_e7cb_2c4d_41325ca1189f["AnthropicTool"] d9be4930_c789_bd64_f6ca_9d5a7ec196ce["chat_models.py"] 9a4060af_4e19_e7cb_2c4d_41325ca1189f -->|defined in| d9be4930_c789_bd64_f6ca_9d5a7ec196ce
Relationship Graph
Source Code
libs/partners/anthropic/langchain_anthropic/chat_models.py lines 96–118
class AnthropicTool(TypedDict):
"""Anthropic tool definition for custom (user-defined) tools.
Custom tools use `name` and `input_schema` fields to define the tool's
interface. These are converted from LangChain tool formats (functions, Pydantic
models, `BaseTool` objects) via `convert_to_anthropic_tool`.
"""
name: str
input_schema: dict[str, Any]
description: NotRequired[str]
strict: NotRequired[bool]
cache_control: NotRequired[dict[str, str]]
defer_loading: NotRequired[bool]
input_examples: NotRequired[list[dict[str, Any]]]
allowed_callers: NotRequired[list[str]]
Source
Frequently Asked Questions
What is the AnthropicTool class?
AnthropicTool is a class in the langchain codebase, defined in libs/partners/anthropic/langchain_anthropic/chat_models.py.
Where is AnthropicTool defined?
AnthropicTool is defined in libs/partners/anthropic/langchain_anthropic/chat_models.py at line 96.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free