pub trait MetadataProvider<Ctx>: Send + Sync {
Show 14 methods
// Provided methods
fn tool_name(_ctx: &Ctx) -> &str { ... }
fn tool_description(_ctx: &Ctx) -> &str { ... }
fn parameter_schema(_ctx: &Ctx) -> Option<Value> { ... }
fn config_schema(_ctx: &Ctx) -> Option<Value> { ... }
fn state_schema(_ctx: &Ctx) -> Option<Value> { ... }
fn prompt_path(_ctx: &Ctx) -> Option<Cow<'static, str>> { ... }
fn default_permission(_ctx: &Ctx) -> ToolPolicy { ... }
fn allow_patterns(_ctx: &Ctx) -> Option<&'static [&'static str]> { ... }
fn deny_patterns(_ctx: &Ctx) -> Option<&'static [&'static str]> { ... }
fn is_mutating(_ctx: &Ctx) -> bool { ... }
fn is_parallel_safe(ctx: &Ctx) -> bool { ... }
fn tool_kind(_ctx: &Ctx) -> &'static str { ... }
fn resource_hints(_ctx: &Ctx, _args: &Value) -> Vec<String> { ... }
fn execution_cost(_ctx: &Ctx) -> u8 { ... }
}Expand description
Provider trait for tool metadata.
Provided Methods§
fn tool_name(_ctx: &Ctx) -> &str
fn tool_description(_ctx: &Ctx) -> &str
fn parameter_schema(_ctx: &Ctx) -> Option<Value>
fn config_schema(_ctx: &Ctx) -> Option<Value>
fn state_schema(_ctx: &Ctx) -> Option<Value>
fn prompt_path(_ctx: &Ctx) -> Option<Cow<'static, str>>
fn default_permission(_ctx: &Ctx) -> ToolPolicy
fn allow_patterns(_ctx: &Ctx) -> Option<&'static [&'static str]>
fn deny_patterns(_ctx: &Ctx) -> Option<&'static [&'static str]>
fn is_mutating(_ctx: &Ctx) -> bool
fn is_parallel_safe(ctx: &Ctx) -> bool
fn tool_kind(_ctx: &Ctx) -> &'static str
fn resource_hints(_ctx: &Ctx, _args: &Value) -> Vec<String>
fn execution_cost(_ctx: &Ctx) -> u8
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".