pub struct McpToolRuntime { /* private fields */ }Expand description
Tools of a single connected MCP server.
The tool list is fetched lazily and cached; call McpToolRuntime::refresh
to re-fetch it. Every request is bounded by the configured timeout.
Implementations§
Source§impl McpToolRuntime
impl McpToolRuntime
Sourcepub async fn connect(config: &McpServerConfig) -> Result<Self, McpError>
pub async fn connect(config: &McpServerConfig) -> Result<Self, McpError>
Connect to the server described by config and complete the MCP handshake.
Sourcepub async fn from_transport<T, E, A>(
config: &McpServerConfig,
transport: T,
) -> Result<Self, McpError>
pub async fn from_transport<T, E, A>( config: &McpServerConfig, transport: T, ) -> Result<Self, McpError>
Complete the MCP handshake over any rmcp client transport (stdio,
Streamable HTTP, an in-memory duplex stream, …). The transport part of
config is ignored; its name, timeout and allow-list are used.
Trait Implementations§
Source§impl Debug for McpToolRuntime
impl Debug for McpToolRuntime
Auto Trait Implementations§
impl !Freeze for McpToolRuntime
impl !RefUnwindSafe for McpToolRuntime
impl !UnwindSafe for McpToolRuntime
impl Forget for McpToolRuntime
impl Move for McpToolRuntime
impl Send for McpToolRuntime
impl Sync for McpToolRuntime
impl Unpin for McpToolRuntime
impl UnsafeUnpin for McpToolRuntime
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