MCPcopy Index your code
hub / github.com/MiniMax-AI/Mini-Agent / test_tool_count_optimization

Function test_tool_count_optimization

tests/test_skill_tool.py:92–111  ·  view source on GitHub ↗

Verify Progressive Disclosure optimization: 3 tools -> 1 tool

()

Source from the content-addressed store, hash-verified

90
91
92def test_tool_count_optimization():
93 """Verify Progressive Disclosure optimization: 3 tools -> 1 tool"""
94 with tempfile.TemporaryDirectory() as tmpdir:
95 # Create a simple test skill
96 skill_dir = Path(tmpdir) / "simple-skill"
97 skill_dir.mkdir()
98 create_test_skill(
99 skill_dir, "simple-skill", "Simple test", "Content"
100 )
101
102 tools, _ = create_skill_tools(tmpdir)
103
104 # After optimization, should only have 1 tool (GetSkillTool)
105 # Before optimization, we had 3 tools (ListSkillsTool, GetSkillTool, UseSkillTool)
106 assert len(tools) == 1
107
108 # Verify it's GetSkillTool
109 tool = tools[0]
110 assert tool.name == "get_skill"
111 assert "get complete content" in tool.description.lower() or "获取" in tool.description

Callers

nothing calls this directly

Calls 2

create_skill_toolsFunction · 0.90
create_test_skillFunction · 0.70

Tested by

no test coverage detected