pub struct ToolDescriptor {
pub id: String,
pub name: String,
pub description: String,
pub kind: ToolKind,
pub arg_names: Vec<String>,
pub arg_descriptions: Vec<String>,
pub score: Option<f32>,
pub meta: Option<Value>,
pub widget_accessible: bool,
pub output_template: Option<String>,
}Expand description
A ranked tool descriptor (Contract 1).
Fields§
§id: String<server>__<tool> | composio__<slug>.
name: String§description: StringNever null — "" when absent.
kind: ToolKind§arg_names: Vec<String>§arg_descriptions: Vec<String>§score: Option<f32>§meta: Option<Value>The tool’s _meta, verbatim (widget keys), when present.
widget_accessible: boolWhether a widget originating from this tool may callTool (companion).
output_template: Option<String>The ui://widget/<slug>.html template uri when this tool renders a widget.
Implementations§
Source§impl ToolDescriptor
impl ToolDescriptor
Sourcepub fn matches_allowlist(&self, allowlist: &[String]) -> bool
pub fn matches_allowlist(&self, allowlist: &[String]) -> bool
Whether this descriptor is reachable under an agent’s tool allowlist,
matching the execution gate ([super::tool_allowed]) so a ?agent=
search view does not under-report tools the agent can actually call:
for MCP/built-in/app tools an entry may be the fully-qualified id, the
bare tool name, or the server segment; for Composio it is matched on
the fully-qualified id only (Composio ids have no name/server grant form,
and id-only is the cross-plane-bypass guard on the call path).
Trait Implementations§
Source§impl Clone for ToolDescriptor
impl Clone for ToolDescriptor
Source§fn clone(&self) -> ToolDescriptor
fn clone(&self) -> ToolDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more