pub trait ErasedTool<Ctx>: Send + Sync {
// Required methods
fn name_str(&self) -> &str;
fn display_name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn input_schema(&self) -> Value;
fn tier(&self) -> ToolTier;
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 ToolContext<Ctx>,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Required Methods§
Sourcefn display_name(&self) -> &'static str
fn display_name(&self) -> &'static str
Get a human-friendly display name for the tool.
Sourcefn description(&self) -> &'static str
fn description(&self) -> &'static str
Get the tool description.
Sourcefn input_schema(&self) -> Value
fn input_schema(&self) -> Value
Get the JSON schema for tool inputs.
Sourcefn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 ToolContext<Ctx>,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 ToolContext<Ctx>,
input: Value,
) -> Pin<Box<dyn Future<Output = Result<ToolResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with the given input.