pub struct Tool {
pub name: String,
pub description: String,
pub parameter_schema: Value,
pub function: ToolFn,
}
Expand description
Represents metadata for a registered tool function.
Contains its name, description, parameter schema, and the execution function.
Fields§
§name: String
The unique name of the tool.
description: String
A brief description of the tool’s purpose.
parameter_schema: Value
JSON Schema describing tool parameters.
function: ToolFn
The internal function pointer for executing the tool. Not serialized.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Tool
impl !RefUnwindSafe for Tool
impl Send for Tool
impl Sync for Tool
impl Unpin 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