pub trait McpService<Counterpart: Role>:
Send
+ Sync
+ 'static {
// Required method
fn execute(
&self,
request: McpRequest,
context: McpRequestContext<Counterpart>,
) -> BoxFuture<'static, Result<McpOutcome, Error>>;
}Available on crate feature
unstable_mcp_over_acp only.Expand description
Reusable MCP application state with owned invocation futures.
Required Methods§
Sourcefn execute(
&self,
request: McpRequest,
context: McpRequestContext<Counterpart>,
) -> BoxFuture<'static, Result<McpOutcome, Error>>
fn execute( &self, request: McpRequest, context: McpRequestContext<Counterpart>, ) -> BoxFuture<'static, Result<McpOutcome, Error>>
Execute one invocation, including backend teardown.
On operation cancellation, stop user work and complete owned cleanup before returning. The binding drives this future through cancellation; dropping it is not used as a substitute for joining cleanup.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".