pub struct CallToolResult {
pub meta: Option<Map<String, Value>>,
pub content: Vec<CallToolResultContent>,
pub is_error: Option<bool>,
pub extra: Map<String, Value>,
}
Expand description
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.
Fields§
§meta: Option<Map<String, Value>>
This result property is reserved by the protocol to allow clients and servers to attach additional metadata to their responses.
content: Vec<CallToolResultContent>
§is_error: Option<bool>
Whether the tool call ended in an error.
If not set, this is assumed to be false (the call was successful).
extra: Map<String, Value>
Additional parameters that are not part of the schema.
Trait Implementations§
Source§impl Clone for CallToolResult
impl Clone for CallToolResult
Source§fn clone(&self) -> CallToolResult
fn clone(&self) -> CallToolResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more