Skip to main content

ToolArgs

Trait ToolArgs 

Source
pub trait ToolArgs: JsonSchema + for<'a> Deserialize<'a> {
    const TOOL_NAME: &'static str;
    const TOOL_DESCRIPTION: &'static str;

    // Provided method
    fn definition() -> ToolDefinition { ... }
}
Expand description

Provides tool name, description, and definitions for tools generated by the #[tool] macro.

Required Associated Constants§

Source

const TOOL_NAME: &'static str

Source

const TOOL_DESCRIPTION: &'static str

Provided Methods§

Source

fn definition() -> ToolDefinition

Generates the tool definition with name, description, and parameter schema.

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§