pub struct McpAccess { /* private fields */ }Expand description
Operator grants for MCP context capabilities.
Discovery never populates this value. A server describing a prompt or resource proves that it exists, not that an agent may read it.
Implementations§
Source§impl McpAccess
impl McpAccess
pub fn new() -> Self
pub fn prompt(self, name: impl Into<String>, safety: McpDataSafety) -> Self
pub fn resource(self, uri: impl Into<String>, safety: McpDataSafety) -> Self
Sourcepub fn task_input(self, safety: McpDataSafety) -> Self
pub fn task_input(self, safety: McpDataSafety) -> Self
Permit answering this server’s outstanding input requests, up to a ceiling.
One grant for the whole server rather than one per task, because a task
id is minted by the server at runtime and an operator cannot review a
name that does not exist yet. Only max_input
is read — tasks/update returns nothing to label.
Ungranted, update_task refuses. That is the same rule prompts and
resources follow and it is the important half here: an elicitation is a
server asking this plane for data, which is the direction an operator
most needs to have said yes to.
Sourcepub fn from_manifest(server: &str, manifest: &Manifest) -> Self
pub fn from_manifest(server: &str, manifest: &Manifest) -> Self
Derive this server’s access catalogue from one reviewed manifest.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpAccess
impl RefUnwindSafe for McpAccess
impl Send for McpAccess
impl Sync for McpAccess
impl Unpin for McpAccess
impl UnsafeUnpin for McpAccess
impl UnwindSafe for McpAccess
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more