Trait TypedTool
Source pub trait TypedTool: Send + Sync {
type Args: DeserializeOwned;
type Output: Serialize;
// Required methods
fn name(&self) -> &'static str;
fn description(&self) -> &'static str;
fn parameters_schema(&self) -> Value;
fn call_typed<'life0, 'life1, 'async_trait>(
&'life0 self,
args: Self::Args,
ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = AgentResult<Self::Output>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn control_flow() -> ToolControlFlow
where Self: Sized { ... }
fn format_output(&self, output: Self::Output) -> String { ... }
}