pub trait ValidatedToolHandler: ToolHandler {
// Required method
fn parameter_schema() -> Value;
// Provided methods
fn validation_config() -> ValidationConfig { ... }
fn create_tool(
name: String,
description: Option<String>,
handler: Self,
) -> Tool
where Self: Sized + 'static { ... }
}Expand description
Trait for tools that can provide their own parameter validation
Required Methods§
Sourcefn parameter_schema() -> Value
fn parameter_schema() -> Value
Get the JSON schema for this tool’s parameters
Provided Methods§
Sourcefn validation_config() -> ValidationConfig
fn validation_config() -> ValidationConfig
Get validation configuration for this tool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".