Smith::MCP::ToolResult
Inherits Struct < Value < Object
What tools/call came back with: the text, and any attachment that came
with it.
Constants
MAX_ATTACHMENTS = 4
How many attachments one call may hand back. A server that answers with twenty screenshots is a context window, and the cap is what stops one call from spending it. What is over the cap is named in the text, never dropped in silence.
Constructors
from_result(result : JSON::Any | Nil) : ToolResult
Sourcenew(text : String, error : Bool = false, media : Array(Smith::Media::Attachment) = Array(Smith::Media::Attachment).new)
SourceInstance methods
error?
Sourcemedia
Images the server returned, decoded far enough to know what they are.
Kept as Media::Attachment rather than an LLM content block so the
protocol layer keeps knowing nothing about the tool layer.
text
Source