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 moreimpl Copy for Capabilities
Source§impl Debug for Capabilities
impl Debug for Capabilities
Source§impl Default for Capabilities
impl Default for Capabilities
Source§fn default() -> Capabilities
fn default() -> Capabilities
impl Eq for Capabilities
Source§impl From<CapabilityOverride> for Capabilities
impl From<CapabilityOverride> for Capabilities
Source§fn from(o: CapabilityOverride) -> Self
fn from(o: CapabilityOverride) -> Self
Source§impl PartialEq for Capabilities
impl PartialEq for Capabilities
impl StructuralPartialEq for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.