pub enum McpEvent {
Show 14 variants
ServerStarted {
addr: String,
},
ToolListRequested {
client_addr: String,
},
ToolListReturned {
client_addr: String,
tool_count: usize,
},
ToolCallReceived {
client_addr: String,
tool_name: String,
parameters: Value,
},
ToolCallCompleted {
client_addr: String,
tool_name: String,
success: bool,
error: Option<String>,
duration_ms: u64,
},
ToolError {
source: String,
tool_name: String,
error: String,
duration_ms: u64,
},
RequestRejected {
client_addr: String,
reason: String,
},
ConnectionInitialized {
endpoint: String,
tool_count: usize,
},
ConnectionClosed {
endpoint: String,
},
ToolsDiscovered {
endpoint: String,
tool_count: usize,
tool_names: Vec<String>,
},
CacheHit {
endpoint: String,
tool_count: usize,
},
CacheExpired {
endpoint: String,
},
RemoteToolCallStarted {
endpoint: String,
tool_name: String,
parameters: Value,
},
RemoteToolCallCompleted {
endpoint: String,
tool_name: String,
success: bool,
error: Option<String>,
duration_ms: u64,
},
}Expand description
Events emitted by MCP servers and MCP clients. Events emitted by MCP servers and MCP HTTP clients.
Variants§
ServerStarted
The HTTP server started listening on the supplied address.
ToolListRequested
A tool-list request was received from a client.
ToolListReturned
A tool-list response was returned to the client.
ToolCallReceived
A tool execution request was received from a client.
Fields
ToolCallCompleted
A server-side tool execution completed.
Fields
ToolError
A tool call failed at the transport or protocol layer.
Fields
RequestRejected
A request was rejected before tool execution.
ConnectionInitialized
An MCP client initialized successfully.
ConnectionClosed
An MCP client connection was closed.
ToolsDiscovered
The tool cache was refreshed from the remote endpoint.
Fields
CacheHit
Cached tool metadata was used.
CacheExpired
Cached tool metadata expired.
RemoteToolCallStarted
A remote tool call is being dispatched.
Fields
RemoteToolCallCompleted
A remote tool call completed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for McpEvent
impl RefUnwindSafe for McpEvent
impl Send for McpEvent
impl Sync for McpEvent
impl Unpin for McpEvent
impl UnsafeUnpin for McpEvent
impl UnwindSafe for McpEvent
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