pub enum Tool {
Mcp(McpToolset),
Provider {
provider: FormatId,
raw: Value,
},
Function(ToolDefinition),
}Expand description
A tool available to the model, in catalog order.
Variants§
Mcp(McpToolset)
A remote MCP server and the tools it exposes.
Provider
A definition without a supported neutral representation.
Fields
Function(ToolDefinition)
An agent-executed function. Its JSON retains the existing flat definition shape.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Tool
impl<'de> Deserialize<'de> for Tool
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<ToolDefinition> for Tool
impl From<ToolDefinition> for Tool
Source§fn from(definition: ToolDefinition) -> Self
fn from(definition: ToolDefinition) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Tool
Auto Trait Implementations§
impl Freeze for Tool
impl RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin for Tool
impl UnsafeUnpin for Tool
impl UnwindSafe for Tool
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