class
MCProtocol::CallToolResult
- MCProtocol::CallToolResult
- Reference
- Object
Overview
The server's response to a tool call.
Any errors that originate from the tool SHOULD be reported inside the result
object, with #isError set to true, not as an MCP protocol-level error
response. Otherwise, the LLM would not be able to see that an error occurred
and self-correct.
However, any errors in finding the tool, an error indicating that the server does not support tool calls, or any other exceptional conditions, should be reported as an MCP error response.
Included Modules
- JSON::Serializable
Defined in:
mcprotocol/call_tool_result.crConstructors
- .new(pull : JSON::PullParser)
- .new(content : Array(String), _meta : JSON::Any | Nil = Nil, isError : Bool | Nil = Nil)
Instance Method Summary
-
#_meta : JSON::Any | Nil
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
- #content : Array(String)
-
#isError : Bool | Nil
Whether the tool call ended in an error.
Constructor Detail
Instance Method Detail
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
Whether the tool call ended in an error.
If not set, this is assumed to be false (the call was successful).