pub struct DeferredTool { /* private fields */ }Expand description
A tool that is on the roster but not on the wire until it is opened.
Everything except Tool::exposure is delegated — same name, same
description, same schema, same behaviour. The only thing that changes is
when the model is told it exists.
Implementations§
Trait Implementations§
Source§impl Tool for DeferredTool
impl Tool for DeferredTool
fn name(&self) -> &'static str
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
Human-readable description of what this tool does and when to use it.
Source§fn schema(&self) -> Value
fn schema(&self) -> Value
JSON Schema for the tool’s input arguments (MCP
inputSchema shape,
without the provider envelope).Source§fn exposure(&self) -> ToolExposure
fn exposure(&self) -> ToolExposure
Visibility level for this tool. Default:
Direct (always visible). Read morefn call<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
args: &'life1 Value,
ctx: &'life2 ToolContext,
) -> Pin<Box<dyn Future<Output = AgentResult<Vec<Content>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn call_timeout_ms(&self, args: &Value) -> Option<u64>
fn call_timeout_ms(&self, args: &Value) -> Option<u64>
Execution budget for a specific call, derived from its
args. Read moreSource§fn metadata(&self) -> ToolMetadata
fn metadata(&self) -> ToolMetadata
Machine-readable metadata for tool introspection. Read more
Source§fn should_activate(&self, ctx: &ActivationContext) -> bool
fn should_activate(&self, ctx: &ActivationContext) -> bool
Activation condition for
Deferred tools. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for DeferredTool
impl !UnwindSafe for DeferredTool
impl Forget for DeferredTool
impl Freeze for DeferredTool
impl Move for DeferredTool
impl Send for DeferredTool
impl Sync for DeferredTool
impl Unpin for DeferredTool
impl UnsafeUnpin for DeferredTool
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