MCPcopy Create free account
hub / github.com/AI45Lab/Code / register_skill

Function register_skill

core/src/tools/builtin/mod.rs:140–155  ·  view source on GitHub ↗

Register the Skill tool for skill-based tool access control.

(
    registry: &Arc<ToolRegistry>,
    llm_client: Arc<dyn crate::llm::LlmClient>,
    skill_registry: Arc<crate::skills::SkillRegistry>,
    tool_executor: Arc<crate::tools::ToolExecutor>,
    base_

Source from the content-addressed store, hash-verified

138
139/// Register the Skill tool for skill-based tool access control.
140pub(crate) fn register_skill(
141 registry: &Arc<ToolRegistry>,
142 llm_client: Arc<dyn crate::llm::LlmClient>,
143 skill_registry: Arc<crate::skills::SkillRegistry>,
144 tool_executor: Arc<crate::tools::ToolExecutor>,
145 base_config: crate::agent::AgentConfig,
146) {
147 use crate::tools::skill::{SearchSkillsTool, SkillTool};
148 registry.register_builtin(Arc::new(SearchSkillsTool::new(Arc::clone(&skill_registry))));
149 registry.register_builtin(Arc::new(SkillTool::new(
150 skill_registry,
151 llm_client,
152 tool_executor,
153 base_config,
154 )));
155}
156
157/// Register the `generate_object` tool for structured JSON output.
158///

Callers 1

Calls 1

register_builtinMethod · 0.45

Tested by

no test coverage detected