pub struct McpToolDef {
pub name: String,
pub description: Option<String>,
pub group: Option<String>,
pub input_schema: Value,
}Expand description
MCP Tool Definition (from tools/list response)
Fields§
§name: String§description: Option<String>§group: Option<String>§input_schema: ValueImplementations§
Source§impl McpToolDef
impl McpToolDef
Sourcepub fn with_group(self, group: impl Into<String>) -> Self
pub fn with_group(self, group: impl Into<String>) -> Self
Set the group.
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set the description.
Sourcepub fn with_schema(self, schema: Value) -> Self
pub fn with_schema(self, schema: Value) -> Self
Set the input schema.
Trait Implementations§
Source§impl Clone for McpToolDef
impl Clone for McpToolDef
Source§fn clone(&self) -> McpToolDef
fn clone(&self) -> McpToolDef
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 McpToolDef
impl Debug for McpToolDef
Source§impl<'de> Deserialize<'de> for McpToolDef
impl<'de> Deserialize<'de> for McpToolDef
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<McpToolDef> for ToolDefinition
impl From<McpToolDef> for ToolDefinition
Source§fn from(tool: McpToolDef) -> Self
fn from(tool: McpToolDef) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for McpToolDef
impl RefUnwindSafe for McpToolDef
impl Send for McpToolDef
impl Sync for McpToolDef
impl Unpin for McpToolDef
impl UnwindSafe for McpToolDef
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