Toolkit

Trait Toolkit 

Source
pub trait Toolkit<TCtx>: Send + Sync {
    // Required method
    fn create_session<'a>(
        &'a self,
        context: &'a TCtx,
    ) -> BoxFuture<'a, Result<Box<dyn ToolkitSession<TCtx> + Send + Sync>, BoxedError>>;
}
Expand description

Toolkit produces a per-session toolkit session that can provide dynamic prompt and tool data.

Required Methods§

Source

fn create_session<'a>( &'a self, context: &'a TCtx, ) -> BoxFuture<'a, Result<Box<dyn ToolkitSession<TCtx> + Send + Sync>, BoxedError>>

Create a new toolkit session for the supplied context value. Implementations should also initialize the session with instructions and tools.

Implementors§

Source§

impl<TCtx> Toolkit<TCtx> for MCPToolkit<TCtx>
where TCtx: Send + Sync + 'static,