#[non_exhaustive]pub struct ToolSpec {
pub name: &'static str,
pub description: &'static str,
pub class: EffectClass,
pub also: Option<EffectClass>,
pub side: Side,
pub cap: AutonomyCap,
pub budget_arg: Option<&'static str>,
pub schema: fn() -> Value,
}Expand description
One tool of a driver class (spec 3.5 §7.13): its name, effect class, side and default autonomy cap, and the JSON Schema of its arguments.
The same name and schema serve an in-process adapter’s toolset and any MCP server that satisfies the class’s manifest, so an agent’s playbook does not depend on which one the owner connected.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: &'static strThe tool’s name, prefixed by its class.
description: &'static strWhat the tool does, as the model reads it.
class: EffectClassThe effect class its manifest declares (spec 3.2 §7.7).
also: Option<EffectClass>A further effect the call has, such as a campaign launch that both spends and
publishes; the manifest declares class, the stricter.
side: SideThe partition side it serves.
cap: AutonomyCapIts default autonomy cap.
budget_arg: Option<&'static str>The JSON pointer of the amount argument a AutonomyCap::WithinBudget call is
measured by, in minor units; None for a call that never adds spend.
schema: fn() -> ValueThe JSON Schema of its arguments.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Forget for ToolSpec
impl Freeze for ToolSpec
impl Move for ToolSpec
impl RefUnwindSafe for ToolSpec
impl Send for ToolSpec
impl Sync for ToolSpec
impl Unpin for ToolSpec
impl UnsafeUnpin for ToolSpecwhere
&'static str: UnsafeUnpin,
impl UnwindSafe for ToolSpecwhere
&'static str: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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