pub struct Capabilities {
pub private_data: bool,
pub untrusted_input: bool,
pub external_send: bool,
pub destructive: bool,
}Expand description
What a tool can do — the vocabulary MCP standardized (readOnly,
destructive, openWorld) plus the two axes that decide whether an agent
can be turned into an exfiltration tool.
The lethal trifecta is private data + untrusted content + a way out. Any agent holding all three can be instructed, by text hidden in the content it reads, to take the private data and send it somewhere. Annotating tools on these axes is what lets the loop refuse that combination structurally.
Fields§
§private_data: boolReturns data the user considers private.
untrusted_input: boolReturns content a third party can influence — a web page, an email body, a calendar invite title. Treat everything it returns as hostile.
external_send: boolCan transmit data outside the user’s control. Note that a plain HTTP GET qualifies: the secret goes in the query string.
destructive: boolMay destroy or overwrite data.
Implementations§
Source§impl Capabilities
impl Capabilities
pub fn private(self) -> Self
pub fn untrusted(self) -> Self
pub fn sends(self) -> Self
pub fn destructive(self) -> Self
Sourcepub fn union(self, other: Capabilities) -> Self
pub fn union(self, other: Capabilities) -> Self
Everything either side declares.
Union rather than assignment, because the only safe direction for an
override is wider. Letting config narrow a tool’s declared
capabilities would disarm the interlock on the strength of a claim
nothing enforces — the same mistake as a sandbox that silently degrades,
and it would make the cheapest configuration the most dangerous one. A
server that genuinely over-declares is what TrifectaPolicy is for: one
deliberate, visible decision instead of a quiet per-server exemption.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more