pub struct HttpMcpTransport { /* private fields */ }Expand description
MCP transport that communicates with an HTTP-based MCP server.
Implementations§
Trait Implementations§
Source§impl Debug for HttpMcpTransport
impl Debug for HttpMcpTransport
Source§impl McpTransport for HttpMcpTransport
impl McpTransport for HttpMcpTransport
Source§fn connect(&self) -> BoxFuture<'_, Result<(), AgentError>>
fn connect(&self) -> BoxFuture<'_, Result<(), AgentError>>
Establish (or re-establish) a connection to the server.
Source§fn reconnect(&self) -> BoxFuture<'_, Result<(), AgentError>>
fn reconnect(&self) -> BoxFuture<'_, Result<(), AgentError>>
Reconnect after a connection drop.
Source§fn status(&self) -> BoxFuture<'_, McpServerStatus>
fn status(&self) -> BoxFuture<'_, McpServerStatus>
Return the current connection status.
Source§fn list_tools(
&self,
) -> BoxFuture<'_, Result<Vec<McpToolDescriptor>, AgentError>>
fn list_tools( &self, ) -> BoxFuture<'_, Result<Vec<McpToolDescriptor>, AgentError>>
List all tools advertised by the server.
Source§fn call_tool(
&self,
tool_name: &str,
arguments: Value,
) -> BoxFuture<'_, Result<Value, AgentError>>
fn call_tool( &self, tool_name: &str, arguments: Value, ) -> BoxFuture<'_, Result<Value, AgentError>>
Invoke a tool by name with the given arguments.
Source§fn disconnect(&self) -> BoxFuture<'_, Result<(), AgentError>>
fn disconnect(&self) -> BoxFuture<'_, Result<(), AgentError>>
Disconnect from the server cleanly.
Auto Trait Implementations§
impl !Freeze for HttpMcpTransport
impl !RefUnwindSafe for HttpMcpTransport
impl !UnwindSafe for HttpMcpTransport
impl Send for HttpMcpTransport
impl Sync for HttpMcpTransport
impl Unpin for HttpMcpTransport
impl UnsafeUnpin for HttpMcpTransport
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