pub struct AliasedTool { /* private fields */ }Expand description
A tool wrapper that exposes a different name while delegating behavior to an inner tool.
This is useful when importing tools from external systems (e.g. MCP servers) where the upstream tool names are not stable or do not match the caller’s desired naming scheme.
Implementations§
Trait Implementations§
Source§impl ToolDyn for AliasedTool
impl ToolDyn for AliasedTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description of what the tool does.
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON Schema for the tool’s input parameters.
Source§fn call(
&self,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + '_>>
fn call( &self, input: Value, ) -> Pin<Box<dyn Future<Output = Result<Value, ToolError>> + Send + '_>>
Execute the tool with the given input.
Source§fn concurrency_hint(&self) -> ToolConcurrencyHint
fn concurrency_hint(&self) -> ToolConcurrencyHint
Optional concurrency hint used by planners/deciders. Read more
Source§fn maybe_streaming(&self) -> Option<&dyn ToolDynStreaming>
fn maybe_streaming(&self) -> Option<&dyn ToolDynStreaming>
If this tool also supports streaming, return a reference to its streaming interface.
Default is None; streaming is opt-in and non-disruptive.
Auto Trait Implementations§
impl Freeze for AliasedTool
impl !RefUnwindSafe for AliasedTool
impl Send for AliasedTool
impl Sync for AliasedTool
impl Unpin for AliasedTool
impl UnsafeUnpin for AliasedTool
impl !UnwindSafe for AliasedTool
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