Skip to main content

ToolSchema

Trait ToolSchema 

Source
pub trait ToolSchema {
    // Required methods
    fn tool_name() -> &'static str;
    fn tool_description() -> &'static str;
    fn input_schema() -> Value;
}
Expand description

Implemented by tool input structs to expose name, description, and schema.

Derive it with #[derive(ToolSchema)] from llmkit-macros.

Required Methods§

Source

fn tool_name() -> &'static str

The tool’s name.

Source

fn tool_description() -> &'static str

The tool’s description.

Source

fn input_schema() -> Value

The JSON Schema for the tool’s input.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§