TypedTool

Trait TypedTool 

Source
pub trait TypedTool {
    type Input;
    type Output;

    // Required methods
    fn name(&self) -> Cow<'static, str>;
    fn description(&self) -> Cow<'static, str>;
    fn input_schema(&self) -> Cow<'static, str>;
    fn annotations(&self) -> ToolAnnotations;
    fn execute(
        &self,
        arguments: Self::Input,
    ) -> impl Future<Output = Self::Output> + Send;
}

Required Associated Types§

Required Methods§

Source

fn name(&self) -> Cow<'static, str>

The name of the tool

Source

fn description(&self) -> Cow<'static, str>

The description of the tool

Source

fn input_schema(&self) -> Cow<'static, str>

The parameters of the tool

Source

fn annotations(&self) -> ToolAnnotations

The annotations of the tool

Source

fn execute( &self, arguments: Self::Input, ) -> impl Future<Output = Self::Output> + Send

Execute the tool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§