Verify Progressive Disclosure optimization: 3 tools -> 1 tool
()
| 90 | |
| 91 | |
| 92 | def 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 |
nothing calls this directly
no test coverage detected