MCPcopy Create free account
hub / github.com/MiniMax-AI/Mini-Agent / GetSkillTool

Class GetSkillTool

mini_agent/tools/skill_tool.py:13–54  ·  view source on GitHub ↗

Tool to get detailed information about a specific skill

Source from the content-addressed store, hash-verified

11
12
13class GetSkillTool(Tool):
14 """Tool to get detailed information about a specific skill"""
15
16 def __init__(self, skill_loader: SkillLoader):
17 self.skill_loader = skill_loader
18
19 @property
20 def name(self) -> str:
21 return "get_skill"
22
23 @property
24 def description(self) -> str:
25 return "Get complete content and guidance for a specified skill, used for executing specific types of tasks"
26
27 @property
28 def parameters(self) -> Dict[str, Any]:
29 return {
30 "type": "object",
31 "properties": {
32 "skill_name": {
33 "type": "string",
34 "description": "Name of the skill to retrieve (use list_skills to view available skills)",
35 }
36 },
37 "required": ["skill_name"],
38 }
39
40 async def execute(self, skill_name: str) -> ToolResult:
41 """Get detailed information about specified skill"""
42 skill = self.skill_loader.get_skill(skill_name)
43
44 if not skill:
45 available = ", ".join(self.skill_loader.list_skills())
46 return ToolResult(
47 success=False,
48 content="",
49 error=f"Skill '{skill_name}' does not exist. Available skills: {available}",
50 )
51
52 # Return complete skill content
53 result = skill.to_prompt()
54 return ToolResult(success=True, content=result)
55
56
57def create_skill_tools(

Callers 3

test_get_skill_toolFunction · 0.90
create_skill_toolsFunction · 0.85

Calls

no outgoing calls

Tested by 2

test_get_skill_toolFunction · 0.72