pub struct ToolSpec {
pub symbol: Symbol,
pub description: String,
pub args_shape: ShapeRef,
pub result_shape: Option<ShapeRef>,
pub category: Symbol,
pub capabilities: Vec<CapabilityName>,
pub function: Value,
}Expand description
Specification for projecting a runtime value into a local Tool.
Fields§
§symbol: SymbolSymbol the tool is registered and dispatched under.
description: StringHuman-facing description of the tool.
args_shape: ShapeRefShape the tool’s arguments must match.
result_shape: Option<ShapeRef>Shape the tool’s result is checked against, if any.
category: SymbolCategory symbol grouping the tool.
capabilities: Vec<CapabilityName>Capabilities the tool requires to run.
function: ValueCallable value invoked when the tool runs.
Auto Trait Implementations§
impl !RefUnwindSafe for ToolSpec
impl !UnwindSafe for ToolSpec
impl Freeze for ToolSpec
impl Send for ToolSpec
impl Sync for ToolSpec
impl Unpin for ToolSpec
impl UnsafeUnpin for ToolSpec
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