pub struct McpToolCall {
pub id: String,
pub server_label: String,
pub name: String,
pub arguments: String,
pub output: Option<String>,
pub error: Option<String>,
}
Expand description
An invocation of a tool on an MCP server.
Fields§
§id: String
The unique ID of the tool call.
server_label: String
The label of the MCP server running the tool.
name: String
The name of the tool that was run.
arguments: String
A JSON string of the arguments passed to the tool.
output: Option<String>
The output from the tool call.
error: Option<String>
The error from the tool call, if any.
Implementations§
Source§impl McpToolCall
impl McpToolCall
Sourcepub fn builder() -> McpToolCallBuilder<((), (), (), (), (), ())>
pub fn builder() -> McpToolCallBuilder<((), (), (), (), (), ())>
Create a builder for building McpToolCall
.
On the builder, call .id(...)
, .server_label(...)
, .name(...)
, .arguments(...)
, .output(...)
(optional), .error(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of McpToolCall
.
Trait Implementations§
Source§impl Clone for McpToolCall
impl Clone for McpToolCall
Source§fn clone(&self) -> McpToolCall
fn clone(&self) -> McpToolCall
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for McpToolCall
impl Debug for McpToolCall
Source§impl<'de> Deserialize<'de> for McpToolCall
impl<'de> Deserialize<'de> for McpToolCall
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 PartialEq for McpToolCall
impl PartialEq for McpToolCall
Source§impl Serialize for McpToolCall
impl Serialize for McpToolCall
impl StructuralPartialEq for McpToolCall
Auto Trait Implementations§
impl Freeze for McpToolCall
impl RefUnwindSafe for McpToolCall
impl Send for McpToolCall
impl Sync for McpToolCall
impl Unpin for McpToolCall
impl UnwindSafe for McpToolCall
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