pub trait ToolBackend: Send + Sync {
// Required method
fn list_tools(
&self,
) -> impl Future<Output = Result<Vec<Tool>, Error>> + Send;
}Expand description
Abstraction over the upstream MCP client used in tests and production.
In production this is backed by the official Rust MCP SDK client.
In tests it is a MockBackend.
Async fn in traits requires Rust ≥ 1.75 (stable in our toolchain).
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.