ToolResult

@SerialName(value = "tool_result")
data class ToolResult(val toolUseId: String, val content: String, val isError: Boolean) : 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)

Properties

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.