pub struct ToolUse {
pub id: String,
pub name: String,
pub input: Option<HashMap<String, Value>>,
pub meta: Option<Value>,
}Expand description
Represents a request from the assistant to call a tool.
See the schema for details
Fields§
§id: StringA unique identifier for this tool use.
This ID is used to match tool results to their corresponding tool uses.
name: StringThe name of the tool to call.
input: Option<HashMap<String, Value>>The arguments to pass to the tool, conforming to the tool’s input schema.
meta: Option<Value>Metadata reserved by MCP for protocol-level metadata.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolUse
impl<'de> Deserialize<'de> for ToolUse
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 From<ToolUse> for CallToolRequestParams
impl From<ToolUse> for CallToolRequestParams
Auto Trait Implementations§
impl Freeze for ToolUse
impl RefUnwindSafe for ToolUse
impl Send for ToolUse
impl Sync for ToolUse
impl Unpin for ToolUse
impl UnsafeUnpin for ToolUse
impl UnwindSafe for ToolUse
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