pub struct McpBridgeTool { /* private fields */ }Expand description
A BaseTool wrapper around a single MCP server tool.
The tool name is the namespaced MCP name (e.g., sqlite__query),
prefixed with mcp__ for the agent’s tool registry.
Implementations§
Source§impl McpBridgeTool
impl McpBridgeTool
Sourcepub fn from_schema(schema: &McpToolSchema, manager: Arc<McpManager>) -> Self
pub fn from_schema(schema: &McpToolSchema, manager: Arc<McpManager>) -> Self
Create a bridge tool from an MCP tool schema and a shared manager.
Trait Implementations§
Source§impl BaseTool for McpBridgeTool
impl BaseTool for McpBridgeTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description shown to the LLM.
Source§fn parameter_schema(&self) -> Value
fn parameter_schema(&self) -> Value
JSON Schema describing the tool’s parameters. Read more
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: HashMap<String, Value>,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: HashMap<String, Value>,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with the given arguments and context.
Source§fn format_validation_error(&self, errors: &[ValidationError]) -> Option<String>
fn format_validation_error(&self, errors: &[ValidationError]) -> Option<String>
Format a validation error into a tool-specific, LLM-friendly message. Read more
Source§fn display_meta(&self) -> Option<ToolDisplayMeta>
fn display_meta(&self) -> Option<ToolDisplayMeta>
Return TUI display metadata for this tool. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for McpBridgeTool
impl !UnwindSafe for McpBridgeTool
impl Freeze for McpBridgeTool
impl Send for McpBridgeTool
impl Sync for McpBridgeTool
impl Unpin for McpBridgeTool
impl UnsafeUnpin for McpBridgeTool
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