pub struct ToolEntry {
pub meta: ToolMeta,
pub schema: fn() -> Result<Arc<JsonObject>, String>,
pub invoke: InvokeFn,
}Expand description
One tool: its row in the table, its schema, and its handler.
Fields§
§meta: ToolMeta§schema: fn() -> Result<Arc<JsonObject>, String>Built on demand and cached by the SDK, keyed on the parameter type.
invoke: InvokeFnImplementations§
Source§impl ToolEntry
impl ToolEntry
Sourcepub fn describe(&self) -> Result<Tool, String>
pub fn describe(&self) -> Result<Tool, String>
The tool as a client sees it.
Two things are added here rather than at the declaration: the annotations, which are derived from the tier so they cannot contradict it, and the confirmation parameter, which is added to exactly the tools whose row asks for it.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolEntry
impl RefUnwindSafe for ToolEntry
impl Send for ToolEntry
impl Sync for ToolEntry
impl Unpin for ToolEntry
impl UnsafeUnpin for ToolEntry
impl UnwindSafe for ToolEntry
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