pub trait ChatToolServer: Send + Sync {
// Required methods
fn open<'life0, 'async_trait>(
&'life0 self,
approval: Arc<dyn Approval>,
) -> Pin<Box<dyn Future<Output = Result<ChatToolEndpoint, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn instructions(&self) -> String;
}Required Methods§
Sourcefn open<'life0, 'async_trait>(
&'life0 self,
approval: Arc<dyn Approval>,
) -> Pin<Box<dyn Future<Output = Result<ChatToolEndpoint, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open<'life0, 'async_trait>(
&'life0 self,
approval: Arc<dyn Approval>,
) -> Pin<Box<dyn Future<Output = Result<ChatToolEndpoint, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Starts serving on the caller’s async runtime. Every write asks
approval; the endpoint stops when the returned value is dropped.
Sourcefn instructions(&self) -> String
fn instructions(&self) -> String
What the endpoints serve, as their MCP instructions say it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".