pub struct ActivateTool { /* private fields */ }Expand description
Opens one of the tools the roster names but does not mount.
Implementations§
Source§impl ActivateTool
impl ActivateTool
Sourcepub fn new(
activation: ToolActivation,
candidates: Vec<(String, ToolExposure, Value)>,
) -> Arc<Self> ⓘ
pub fn new( activation: ToolActivation, candidates: Vec<(String, ToolExposure, Value)>, ) -> Arc<Self> ⓘ
candidates is every tool this can open — the same list the roster is
rendered from. Keeping one list is what stops the two from drifting.
Trait Implementations§
Source§impl Tool for ActivateTool
impl Tool for ActivateTool
Source§fn exposure(&self) -> ToolExposure
fn exposure(&self) -> ToolExposure
Exposure is Direct: this one must always be on the wire, or nothing can
ever be opened.
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).fn 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 Forget for ActivateTool
impl Freeze for ActivateTool
impl Move for ActivateTool
impl RefUnwindSafe for ActivateTool
impl Send for ActivateTool
impl Sync for ActivateTool
impl Unpin for ActivateTool
impl UnsafeUnpin for ActivateTool
impl UnwindSafe for ActivateTool
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