pub struct ActivateToolsTool;Expand description
Model-initiated deterministic exact activation. Every requested id must
be an exact known cataloged ToolId; the whole batch validates first
(host grant issuance: exact id, current generation/digest, source trust)
and applies atomically in stable id order with exactly one session
schema-generation advance. Requires host-supplied confirmation
authority; a model-authored JSON flag can never substitute for it.
Trait Implementations§
Source§impl Tool for ActivateToolsTool
impl Tool for ActivateToolsTool
Source§fn execute_rich<'life0, 'async_trait>(
&'life0 self,
params: Value,
ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, RuntimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ActivateToolsTool: 'async_trait,
fn execute_rich<'life0, 'async_trait>(
&'life0 self,
params: Value,
ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = Result<ToolOutput, RuntimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ActivateToolsTool: 'async_trait,
The text summary first (compaction, previews and non-Anthropic
providers read it), then one tool_reference per activated tool,
keyed by canonical tool id. On the Anthropic transport with deferred
loading, the wire layer resolves each id to its wire name and sends
only the references, which makes the deferred definitions callable
without changing the cached prompt prefix. Everywhere else the
references are dropped and the text stands alone.
Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§fn origin(&self) -> ToolOrigin
fn origin(&self) -> ToolOrigin
Unknown (fail-closed source
trust), and tools that declare an owning extension classify as
extension-provided. Built-in implementations override this explicitly.Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
params: Value,
ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String, RuntimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ActivateToolsTool: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
params: Value,
ctx: ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String, RuntimeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
ActivateToolsTool: 'async_trait,
Source§fn extension_id(&self) -> Option<&str>
fn extension_id(&self) -> Option<&str>
None.Source§fn effect(&self) -> ToolEffect
fn effect(&self) -> ToolEffect
NonIdempotent — serialized execution;
implementations opt IN to weaker classes explicitly.Source§fn runs_independently(&self) -> bool
fn runs_independently(&self) -> bool
NonIdempotent tools
use. Scheduling only — the effect class, and with it the rule that an
interrupted call is never re-run automatically, is unchanged.Source§fn concurrency_key(&self, _validated_input: &Value) -> Option<ConcurrencyKey>
fn concurrency_key(&self, _validated_input: &Value) -> Option<ConcurrencyKey>
Serialize explicitly
fails closed into the global mutation lane; None is the conservative
default for tools with no key support.Auto Trait Implementations§
impl Freeze for ActivateToolsTool
impl RefUnwindSafe for ActivateToolsTool
impl Send for ActivateToolsTool
impl Sync for ActivateToolsTool
impl Unpin for ActivateToolsTool
impl UnsafeUnpin for ActivateToolsTool
impl UnwindSafe for ActivateToolsTool
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more