pub struct ToolUseContent {
pub id: String,
pub name: String,
pub input: Value,
pub meta: Option<HashMap<String, Value>>,
}Expand description
Tool use content (MCP 2025-11-25 draft, SEP-1577)
Represents a request from the LLM to call a tool during sampling. The model wants to execute a function and receive its results.
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: ValueThe arguments to pass to the tool, conforming to the tool’s input schema
meta: Option<HashMap<String, Value>>Optional metadata about the tool use Clients SHOULD preserve this field when including tool uses in subsequent sampling requests to enable caching optimizations
Trait Implementations§
Source§impl Clone for ToolUseContent
impl Clone for ToolUseContent
Source§fn clone(&self) -> ToolUseContent
fn clone(&self) -> ToolUseContent
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 ToolUseContent
impl Debug for ToolUseContent
Source§impl<'de> Deserialize<'de> for ToolUseContent
impl<'de> Deserialize<'de> for ToolUseContent
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 ToolUseContent
impl RefUnwindSafe for ToolUseContent
impl Send for ToolUseContent
impl Sync for ToolUseContent
impl Unpin for ToolUseContent
impl UnsafeUnpin for ToolUseContent
impl UnwindSafe for ToolUseContent
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