pub trait CanProvideToolMetadata: Send + Sync {
Show 14 methods
// Required methods
fn tool_name(&self) -> &str;
fn tool_description(&self) -> &str;
fn parameter_schema(&self) -> Option<Value>;
fn config_schema(&self) -> Option<Value>;
fn state_schema(&self) -> Option<Value>;
fn prompt_path(&self) -> Option<Cow<'static, str>>;
fn default_permission(&self) -> ToolPolicy;
fn allow_patterns(&self) -> Option<&'static [&'static str]>;
fn deny_patterns(&self) -> Option<&'static [&'static str]>;
fn is_mutating(&self) -> bool;
fn is_parallel_safe(&self) -> bool;
fn tool_kind(&self) -> &'static str;
fn resource_hints(&self, args: &Value) -> Vec<String>;
fn execution_cost(&self) -> u8;
}Required Methods§
fn tool_name(&self) -> &str
fn tool_description(&self) -> &str
fn parameter_schema(&self) -> Option<Value>
fn config_schema(&self) -> Option<Value>
fn state_schema(&self) -> Option<Value>
fn prompt_path(&self) -> Option<Cow<'static, str>>
fn default_permission(&self) -> ToolPolicy
fn allow_patterns(&self) -> Option<&'static [&'static str]>
fn deny_patterns(&self) -> Option<&'static [&'static str]>
fn is_mutating(&self) -> bool
fn is_parallel_safe(&self) -> bool
fn tool_kind(&self) -> &'static str
fn resource_hints(&self, args: &Value) -> Vec<String>
fn execution_cost(&self) -> u8
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".