pub struct MCPMessage {
pub id: Option<String>,
pub type_: Option<MCPCallType>,
pub server_label: Option<String>,
pub error: Option<String>,
pub tools: Option<Vec<MCPTool>>,
pub arguments: Option<String>,
pub name: Option<String>,
pub output: Option<Value>,
}Expand description
MCP tool call payload
Fields§
§id: Option<String>Unique id of this MCP tool call
type_: Option<MCPCallType>Tool call type: mcp_list_tools, mcp_call
server_label: Option<String>MCP server label
error: Option<String>Error message if any
tools: Option<Vec<MCPTool>>Tool list when type = mcp_list_tools
arguments: Option<String>Tool call arguments (JSON string) when type = mcp_call
name: Option<String>Tool name when type = mcp_call
output: Option<Value>Tool returned output when type = mcp_call
Implementations§
Source§impl MCPMessage
impl MCPMessage
pub fn id(&self) -> Option<&str>
pub fn type_(&self) -> Option<&MCPCallType>
pub fn server_label(&self) -> Option<&str>
pub fn error(&self) -> Option<&str>
pub fn tools(&self) -> Option<&[MCPTool]>
pub fn arguments(&self) -> Option<&str>
pub fn name(&self) -> Option<&str>
pub fn output(&self) -> Option<&Value>
Trait Implementations§
Source§impl Clone for MCPMessage
impl Clone for MCPMessage
Source§fn clone(&self) -> MCPMessage
fn clone(&self) -> MCPMessage
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 MCPMessage
impl Debug for MCPMessage
Source§impl<'de> Deserialize<'de> for MCPMessage
impl<'de> Deserialize<'de> for MCPMessage
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
Source§impl Serialize for MCPMessage
impl Serialize for MCPMessage
Source§impl Validate for MCPMessage
impl Validate for MCPMessage
Source§impl<'v_a> ValidateArgs<'v_a> for MCPMessage
impl<'v_a> ValidateArgs<'v_a> for MCPMessage
Auto Trait Implementations§
impl Freeze for MCPMessage
impl RefUnwindSafe for MCPMessage
impl Send for MCPMessage
impl Sync for MCPMessage
impl Unpin for MCPMessage
impl UnsafeUnpin for MCPMessage
impl UnwindSafe for MCPMessage
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