pub struct McpToolCallResult {
pub content: Vec<McpContent>,
pub is_error: bool,
}Expand description
The result returned by an MCP server after a tools/call request.
§JSON shape (from server)
{
"content": [
{ "type": "text", "text": "Hello from MCP tool!" }
],
"isError": false
}Fields§
§content: Vec<McpContent>One or more content blocks returned by the tool. Usually just a single Text block, but can include images or embedded resources.
is_error: boolIf true, the content describes an error that occurred during tool execution. The agent should treat this as a tool error, not a successful result.
Trait Implementations§
Source§impl Clone for McpToolCallResult
impl Clone for McpToolCallResult
Source§fn clone(&self) -> McpToolCallResult
fn clone(&self) -> McpToolCallResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for McpToolCallResult
impl Debug for McpToolCallResult
Source§impl<'de> Deserialize<'de> for McpToolCallResult
impl<'de> Deserialize<'de> for McpToolCallResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for McpToolCallResult
impl RefUnwindSafe for McpToolCallResult
impl Send for McpToolCallResult
impl Sync for McpToolCallResult
impl Unpin for McpToolCallResult
impl UnsafeUnpin for McpToolCallResult
impl UnwindSafe for McpToolCallResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more