pub struct ToolEntry {
pub name: String,
pub description: String,
pub discovery_summary: String,
pub description_templates: Option<ToolDescriptionLibrary>,
pub effect: EffectKind,
pub risk: RiskClass,
pub schema: Value,
pub footprint: FootprintSpec,
pub proposal_bindings: Vec<ProposalBinding>,
pub durable: bool,
pub origin: ToolOrigin,
pub hot: bool,
}Expand description
One tool in the catalog.
Fields§
§name: String§description: String§discovery_summary: StringTrusted text tool_search ranks by, when non-empty (PSP-10
system 25). Separate from the model-facing description so untrusted
external descriptions never steer discovery.
description_templates: Option<ToolDescriptionLibrary>Optional per-route presentation library; absent means the
route-neutral description serves every route.
effect: EffectKind§risk: RiskClass§schema: ValueJSON Schema for the tool’s arguments.
footprint: FootprintSpecDeclarative selectors mapping validated arguments to resources.
proposal_bindings: Vec<ProposalBinding>Deterministic argument-to-proposal bindings.
durable: boolWhether the tool mutates durable state (gates R5 bracketing).
origin: ToolOrigin§hot: boolPart of the hot set: visible without discovery. The domain’s common operating loop (read, edit, test, build, format) stays hot; deferred discovery is for rare tools and external servers, never the basic loop. Context economy only — authority is still the kernel’s.
Implementations§
Source§impl ToolEntry
impl ToolEntry
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Validate the entry at catalog-assembly time (Gates J and P).
The schema must be an object schema; the footprint must reference only declared arguments; and a mutating effect must declare a footprint.
Sourcepub fn validate_arguments(&self, arguments: &Value) -> Result<()>
pub fn validate_arguments(&self, arguments: &Value) -> Result<()>
Validate provider-supplied arguments locally. Provider strict-schema support is only an optimization; this is the harness trust boundary. Catalog assembly guarantees the schema belongs to the profile this validator implements completely.
Sourcepub fn to_spec_for_route(&self, route: &PromptRoute, strict: bool) -> ToolSpec
pub fn to_spec_for_route(&self, route: &PromptRoute, strict: bool) -> ToolSpec
The spec compiled for one prompt route (PSP-10 system 25). With no
description library this equals ToolEntry::to_spec byte for
byte; with one, the first matching override (exact
"adapter/family", then adapter, then family) replaces only the
description — never authority fields.
Sourcepub fn discovery_text(&self) -> &str
pub fn discovery_text(&self) -> &str
The text tool_search ranks: the discovery summary when present,
else the route-neutral description.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolEntry
impl<'de> Deserialize<'de> for ToolEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for ToolEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.