pub struct McpToolAdapter { /* private fields */ }Expand description
Adapter that wraps an MCP tool to be used as a VEX Tool.
Implementations§
Source§impl McpToolAdapter
impl McpToolAdapter
pub fn new(client: Arc<McpClient>, info: McpToolInfo) -> Self
Trait Implementations§
Source§impl Tool for McpToolAdapter
impl Tool for McpToolAdapter
Source§fn definition(&self) -> &ToolDefinition
fn definition(&self) -> &ToolDefinition
Returns the tool’s metadata (name, description, schema)
Source§fn capabilities(&self) -> Vec<Capability>
fn capabilities(&self) -> Vec<Capability>
Required capabilities for sandboxing. Read more
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool with given arguments. Read more
Source§fn validate(&self, _args: &Value) -> Result<(), ToolError>
fn validate(&self, _args: &Value) -> Result<(), ToolError>
Validate arguments before execution. Read more
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Whether the tool is currently available. Read more
Auto Trait Implementations§
impl Freeze for McpToolAdapter
impl !RefUnwindSafe for McpToolAdapter
impl Send for McpToolAdapter
impl Sync for McpToolAdapter
impl Unpin for McpToolAdapter
impl !UnwindSafe for McpToolAdapter
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more