Skip to main content

ToolT

Trait ToolT 

Source
pub trait ToolT:
    Send
    + Sync
    + Debug
    + ToolRuntime {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn args_schema(&self) -> Value;

    // Provided method
    fn output_schema(&self) -> Option<Value> { ... }
}

Required Methods§

Source

fn name(&self) -> &str

The name of the tool.

Source

fn description(&self) -> &str

A description explaining the tool’s purpose.

Source

fn args_schema(&self) -> Value

Return a description of the expected arguments.

Provided Methods§

Source

fn output_schema(&self) -> Option<Value>

Return a description of the tool output when available.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§