pub struct WebMcpContext {
pub url: String,
pub title: Option<String>,
pub state: HashMap<String, Value>,
pub available_actions: Vec<String>,
pub user_context: Option<WebMcpUserContext>,
}Expand description
Page context metadata exposed via WebMCP.
Maps to navigator.modelContext.provideContext(). Provides the agent
with structured information about the current page state without
requiring visual inference (screenshots).
Fields§
§url: StringURL of the page providing context.
title: Option<String>Human-readable page title.
state: HashMap<String, Value>Structured page state (application-specific).
available_actions: Vec<String>List of available user actions on the page.
user_context: Option<WebMcpUserContext>Current user identity context (if authenticated).
Trait Implementations§
Source§impl Clone for WebMcpContext
impl Clone for WebMcpContext
Source§fn clone(&self) -> WebMcpContext
fn clone(&self) -> WebMcpContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for WebMcpContext
impl ComposeSchema for WebMcpContext
Source§impl Debug for WebMcpContext
impl Debug for WebMcpContext
Source§impl<'de> Deserialize<'de> for WebMcpContext
impl<'de> Deserialize<'de> for WebMcpContext
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
Source§impl PartialEq for WebMcpContext
impl PartialEq for WebMcpContext
Source§impl Serialize for WebMcpContext
impl Serialize for WebMcpContext
Source§impl ToSchema for WebMcpContext
impl ToSchema for WebMcpContext
impl StructuralPartialEq for WebMcpContext
Auto Trait Implementations§
impl Freeze for WebMcpContext
impl RefUnwindSafe for WebMcpContext
impl Send for WebMcpContext
impl Sync for WebMcpContext
impl Unpin for WebMcpContext
impl UnwindSafe for WebMcpContext
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