anthropic_types
Class info¶
🛈 DocStrings¶
Anthropic SDK types for tool result content blocks.
This module defines a discriminated union of all possible content types that can appear in tool results from the Anthropic SDK. These types are used to provide proper typing for ToolResultBlock.content.
validate_tool_result_content
¶
Validate and parse raw tool result content into typed blocks.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
list[dict[str, object]]
|
Raw list of content block dictionaries from CLI output |
required |
Returns:
| Type | Description |
|---|---|
list[ToolResultContentBlock]
|
List of validated and typed content blocks |