Home / Class/ ToolParam Class — anthropic-sdk-python Architecture

ToolParam Class — anthropic-sdk-python Architecture

Architecture documentation for the ToolParam class in tool_param.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  3a1b73b3_05d5_7657_1e56_a96f0f91c25e["ToolParam"]
  0a6fc20c_de0a_9f7c_f378_c2e368483562["tool_param.py"]
  3a1b73b3_05d5_7657_1e56_a96f0f91c25e -->|defined in| 0a6fc20c_de0a_9f7c_f378_c2e368483562

Relationship Graph

Source Code

src/anthropic/types/tool_param.py lines 33–72

class ToolParam(TypedDict, total=False):
    input_schema: Required[InputSchema]
    """[JSON schema](https://json-schema.org/draft/2020-12) for this tool's input.

    This defines the shape of the `input` that your tool accepts and that the model
    will produce.
    """

    name: Required[str]
    """Name of the tool.

    This is how the tool will be called by the model and in `tool_use` blocks.
    """

    cache_control: Optional[CacheControlEphemeralParam]
    """Create a cache control breakpoint at this content block."""

    description: str
    """Description of what this tool does.

    Tool descriptions should be as detailed as possible. The more information that
    the model has about what the tool is and how to use it, the better it will
    perform. You can use natural language descriptions to reinforce important
    aspects of the tool input JSON schema.
    """

    eager_input_streaming: Optional[bool]
    """Enable eager input streaming for this tool.

    When true, tool input parameters will be streamed incrementally as they are
    generated, and types will be inferred on-the-fly rather than buffering the full
    JSON output. When false, streaming is disabled for this tool even if the
    fine-grained-tool-streaming beta is active. When null (default), uses the
    default behavior based on beta headers.
    """

    strict: bool
    """When true, guarantees schema validation on tool names and inputs"""

    type: Optional[Literal["custom"]]

Frequently Asked Questions

What is the ToolParam class?
ToolParam is a class in the anthropic-sdk-python codebase, defined in src/anthropic/types/tool_param.py.
Where is ToolParam defined?
ToolParam is defined in src/anthropic/types/tool_param.py at line 33.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free