Smith::Tools::CallResult
Inherits Struct < Value < Object
Constructors
new(id : String, content : String, is_error : Bool = false, media : Array(Smith::LLM::ContentBlock) = Array(Smith::LLM::ContentBlock).new)
SourceInstance methods
content
Sourceid
Sourceis_error
Sourcemedia
An image or PDF the call produced. Empty for every error path and for every tool that answers in text, which is nearly all of them.
to_content_blocks
The tool_result, then whatever travelled with it — flat, as siblings in the same message, each stamped with the call's id.
Nesting them inside the tool_result would match Anthropic's wire shape, but every part of smith that walks a message — the session store that externalizes attachment bytes, the token estimate, the renderers — reads top-level blocks. Flat keeps all of that working untouched, and the one provider that wants them nested folds them back at serialization time.