diff --git a/src/anthropic/types/beta/tools/tool_param.py b/src/anthropic/types/beta/tools/tool_param.py index 19eeed52..613076e3 100644 --- a/src/anthropic/types/beta/tools/tool_param.py +++ b/src/anthropic/types/beta/tools/tool_param.py @@ -2,18 +2,21 @@ from __future__ import annotations -from typing import Optional +from typing import Dict, Union, Optional from typing_extensions import Literal, Required, TypedDict __all__ = ["ToolParam", "InputSchema"] -class InputSchema(TypedDict, total=False): +class InputSchemaTyped(TypedDict, total=False): type: Required[Literal["object"]] properties: Optional[object] +InputSchema = Union[InputSchemaTyped, Dict[str, object]] + + class ToolParam(TypedDict, total=False): input_schema: Required[InputSchema] """[JSON schema](https://json-schema.org/) for this tool's input.