Skip to main content

ToolSource

Trait ToolSource 

pub trait ToolSource: Send + Sync {
    // Required method
    fn tools(&self, request: &ToolRequest<'_>) -> Result<Vec<Box<dyn Tool>>>;
}
Expand description

Supplies tool registries.

Required Methods§

Source

fn tools(&self, request: &ToolRequest<'_>) -> Result<Vec<Box<dyn Tool>>>

Return the tools for request. The runtime may add its own core tools and remove any tool the resolved policy excludes; it never adds a tool the policy forbids because a source returned it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§