NAME
Claude::Agent::Content::ToolResult - Tool result content block
DESCRIPTION
A tool result content block containing the output from a tool execution.
ATTRIBUTES
type
Always tool_result. Read only.
tool_use_id
ID of the tool_use block this is responding to.
content
Result content: a string, or an ArrayRef of content blocks.
is_error
True when the tool execution failed. Carries whatever the CLI sent (a JSON boolean decodes to a JSON::PP::Boolean), so test it for truth rather than comparing it. has_is_error reports whether it was given.
raw
The decoded block as the CLI sent it, when the object was built by Claude::Agent::Content->from_json.
METHODS
new
Takes a flat list of name/value pairs. Unknown names are ignored.
text
my $text = $block->text;
The content as text: the string itself, or the text of every text block joined with newlines.
AUTHOR
LNATION, <email at lnation.org>
LICENSE
This software is Copyright (c) 2026 by LNATION.
This is free software, licensed under The Artistic License 2.0 (GPL Compatible).