ToolResult

@SerialName(value = "tool_result")
data class ToolResult(val toolUseId: String, val content: String, val isError: Boolean, val cacheControl: AnthropicCacheControl? = null) : AnthropicContent(source)

Represents the result of a tool invocation within the Anthropic content system.

Constructors

Link copied to clipboard
constructor(toolUseId: String, content: String, isError: Boolean, cacheControl: AnthropicCacheControl? = null)

Properties

Link copied to clipboard

Optional cache control directive for explicit breakpoint prompt caching. When set on the last content block in the list, all content blocks are eligible for caching.

Link copied to clipboard

The output or result generated by the tool invocation.

Link copied to clipboard

Whether this tool result represents an error. When true, Anthropic will treat the content as an error message. Null means not an error (field omitted from the request).

Link copied to clipboard

The unique identifier of the invoked tool for which this result corresponds.