pub struct SamplingTool {
pub name: String,
pub title: Option<String>,
pub description: Option<String>,
pub input_schema: Value,
pub output_schema: Option<Value>,
pub icons: Option<Vec<ToolIcon>>,
pub annotations: Option<ToolAnnotations>,
pub execution: Option<ToolExecution>,
}Expand description
Tool definition for use in sampling requests (SEP-1577)
The MCP spec uses the full Tool type for sampling tools.
This struct mirrors ToolDefinition with all optional fields.
Fields§
§name: StringThe name of the tool
title: Option<String>Human-readable title for display purposes
description: Option<String>Description of what the tool does
input_schema: ValueJSON Schema describing the tool’s input parameters
output_schema: Option<Value>Optional JSON Schema defining expected output structure
icons: Option<Vec<ToolIcon>>Optional icons for display in user interfaces
annotations: Option<ToolAnnotations>Optional annotations describing tool behavior
execution: Option<ToolExecution>Optional execution configuration for task support
Trait Implementations§
Source§impl Clone for SamplingTool
impl Clone for SamplingTool
Source§fn clone(&self) -> SamplingTool
fn clone(&self) -> SamplingTool
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 SamplingTool
impl Debug for SamplingTool
Source§impl<'de> Deserialize<'de> for SamplingTool
impl<'de> Deserialize<'de> for SamplingTool
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 SamplingTool
impl RefUnwindSafe for SamplingTool
impl Send for SamplingTool
impl Sync for SamplingTool
impl Unpin for SamplingTool
impl UnsafeUnpin for SamplingTool
impl UnwindSafe for SamplingTool
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