pub trait ToolContext {
const NAME: &'static str;
// Required method
fn context(&self) -> &'static str;
}Expand description
Trait for tools that provide usage context for LLM system prompts.
Implement this trait on tool types (for frameworks like rig) to enable automatic system prompt
generation via SystemPromptBuilder.
§Example
use llm_coding_tools_core::context::ToolContext;
struct MyTool;
impl ToolContext for MyTool {
const NAME: &'static str = "mytool";
fn context(&self) -> &'static str {
"Instructions for using MyTool..."
}
}Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.