pub enum ConnectionAccess {
Full,
Methods {
access: Vec<ActionAccess>,
methods: Vec<Method>,
},
Actions {
actions: Vec<GrantedAction>,
},
}Expand description
The access a grant confers on one connection, surfaced to the MCP client so
the agent knows what it can run without probing. Derived from the grant’s
[AccessRules]: no rule (or an unrestricted one) is ConnectionAccess::Full,
a method-scoped rule is ConnectionAccess::Methods, and an action-scoped
rule is ConnectionAccess::Actions with each id resolved to its title and
access level.
JSON schema
{
"description": "The access a grant confers on one connection, surfaced to the MCP client so\nthe agent knows what it can run without probing. Derived from the grant's\n[`AccessRules`]: no rule (or an unrestricted one) is [`ConnectionAccess::Full`],\na method-scoped rule is [`ConnectionAccess::Methods`], and an action-scoped\nrule is [`ConnectionAccess::Actions`] with each id resolved to its title and\naccess level.",
"oneOf": [
{
"description": "Every action on the connection.",
"type": "object",
"required": [
"policy"
],
"properties": {
"policy": {
"type": "string",
"enum": [
"full"
]
}
}
},
{
"description": "Only actions at the levels `methods` stand for, reported in `access`.",
"type": "object",
"required": [
"access",
"methods",
"policy"
],
"properties": {
"access": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ActionAccess"
}
},
"methods": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Method"
}
},
"policy": {
"type": "string",
"enum": [
"methods"
]
}
}
},
{
"description": "Only these specific actions.",
"type": "object",
"required": [
"actions",
"policy"
],
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/components/schemas/GrantedAction"
}
},
"policy": {
"type": "string",
"enum": [
"actions"
]
}
}
}
]
}Variants§
Full
Methods
Only actions at the levels methods stand for, reported in access.
Actions
Only these specific actions.
Fields
§
actions: Vec<GrantedAction>Trait Implementations§
Source§impl Clone for ConnectionAccess
impl Clone for ConnectionAccess
Source§impl Debug for ConnectionAccess
impl Debug for ConnectionAccess
Source§impl<'de> Deserialize<'de> for ConnectionAccess
impl<'de> Deserialize<'de> for ConnectionAccess
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for ConnectionAccess
impl Freeze for ConnectionAccesswhere
*const u8 is !null: Freeze,
PhantomData<ActionAccess>: Freeze,
PhantomData<Method>: Freeze,
PhantomData<GrantedAction>: Freeze,
impl Move for ConnectionAccess
impl RefUnwindSafe for ConnectionAccess
impl Send for ConnectionAccesswhere
RawVecInner: Send,
impl Sync for ConnectionAccesswhere
RawVecInner: Sync,
impl Unpin for ConnectionAccess
impl UnsafeUnpin for ConnectionAccesswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<ActionAccess>: UnsafeUnpin,
PhantomData<Method>: UnsafeUnpin,
PhantomData<GrantedAction>: UnsafeUnpin,
impl UnwindSafe for ConnectionAccesswhere
RawVecInner: 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
Mutably borrows from an owned value. Read more