pub struct InvokeSkillTool { /* private fields */ }Expand description
Tool that loads skill content into the conversation context.
Skills are markdown files with YAML frontmatter discovered from:
<project>/.opendev/skills/(highest priority)~/.opendev/skills/- Built-in skills embedded in the binary
Also surfaces MCP prompts as invokable commands using server:prompt syntax.
Implementations§
Source§impl InvokeSkillTool
impl InvokeSkillTool
Sourcepub fn new(skill_loader: Arc<Mutex<SkillLoader>>) -> Self
pub fn new(skill_loader: Arc<Mutex<SkillLoader>>) -> Self
Create a new invoke_skill tool with a shared skill loader.
Sourcepub fn with_mcp(
skill_loader: Arc<Mutex<SkillLoader>>,
mcp_manager: Arc<McpManager>,
) -> Self
pub fn with_mcp( skill_loader: Arc<Mutex<SkillLoader>>, mcp_manager: Arc<McpManager>, ) -> Self
Create a new invoke_skill tool with MCP prompt support.
Trait Implementations§
Source§impl BaseTool for InvokeSkillTool
impl BaseTool for InvokeSkillTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Human-readable description shown to the LLM.
Source§fn parameter_schema(&self) -> Value
fn parameter_schema(&self) -> Value
JSON Schema describing the tool’s parameters. Read more
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: HashMap<String, Value>,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
args: HashMap<String, Value>,
_ctx: &'life1 ToolContext,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the tool with the given arguments and context.
Source§fn format_validation_error(&self, errors: &[ValidationError]) -> Option<String>
fn format_validation_error(&self, errors: &[ValidationError]) -> Option<String>
Format a validation error into a tool-specific, LLM-friendly message. Read more
Source§fn display_meta(&self) -> Option<ToolDisplayMeta>
fn display_meta(&self) -> Option<ToolDisplayMeta>
Return TUI display metadata for this tool. Read more
Auto Trait Implementations§
impl !Freeze for InvokeSkillTool
impl !RefUnwindSafe for InvokeSkillTool
impl !UnwindSafe for InvokeSkillTool
impl Send for InvokeSkillTool
impl Sync for InvokeSkillTool
impl Unpin for InvokeSkillTool
impl UnsafeUnpin for InvokeSkillTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more