pub struct SdkMcpTool { /* private fields */ }Expand description
MCP tool projection of the versioned SDK facade. The MCP envelope and tool-call id never enter the SDK request or its canonical session data.
Implementations§
Source§impl SdkMcpTool
impl SdkMcpTool
Sourcepub fn new() -> SdkMcpTool
pub fn new() -> SdkMcpTool
Create an independent stateful SDK projection for one MCP server.
Sourcepub async fn attached(
runtime: Arc<dyn SdkRuntime>,
) -> Result<SdkMcpTool, SdkError>
pub async fn attached( runtime: Arc<dyn SdkRuntime>, ) -> Result<SdkMcpTool, SdkError>
Project an already-owned SDK runtime into MCP without granting MCP process-launch, persistence, or shutdown authority.
Trait Implementations§
Source§impl Default for SdkMcpTool
Available on crate feature adapter-mcp only.
impl Default for SdkMcpTool
Available on crate feature
adapter-mcp only.Source§fn default() -> SdkMcpTool
fn default() -> SdkMcpTool
Returns the “default value” for a type. Read more
Source§impl Tool for SdkMcpTool
impl Tool for SdkMcpTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
The built-in description. May be overridden via
crate::Config.Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema describing the tool’s input object.
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
SdkMcpTool: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Value,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
SdkMcpTool: 'async_trait,
Run the tool. Returns text to feed back to the model.
Auto Trait Implementations§
impl !RefUnwindSafe for SdkMcpTool
impl !UnwindSafe for SdkMcpTool
impl Freeze for SdkMcpTool
impl Send for SdkMcpTool
impl Sync for SdkMcpTool
impl Unpin for SdkMcpTool
impl UnsafeUnpin for SdkMcpTool
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