test updates

This commit is contained in:
John Lancaster
2026-08-27 18:52:41 -05:00
parent f3bbbfc25f
commit 8a994ff47b
5 changed files with 17 additions and 55 deletions
+8 -38
View File
@@ -10,49 +10,19 @@ pytestmark = pytest.mark.smoke
class TestMcpSkillsSurface:
"""Covers native skill resources over the HTTP MCP surface."""
class TestCompatibilityTools:
"""Covers metadata for tool-only MCP clients."""
class TestTools:
"""Covers absence of deprecated compatibility tools."""
@pytest.mark.asyncio
async def test_exposes_safe_human_readable_tools(self, mcp_session_factory) -> None:
"""Ensures clients receive display titles and complete safety hints."""
async def test_does_not_expose_resource_bridge_tools(self, mcp_session_factory) -> None:
"""Ensures native resources are not projected through legacy compatibility tools."""
async with mcp_session_factory() as mcp_session:
result = await mcp_session.list_tools()
tools = {tool.name: tool for tool in result.tools}
assert tools["search_skills"].title == "Search Skills"
assert tools["list_resources"].title == "List Resources"
assert tools["read_resource"].title == "Read Resource"
assert all(tool.annotations is not None for tool in tools.values())
assert all(tool.annotations.read_only_hint for tool in tools.values() if tool.annotations is not None)
assert all(tool.annotations.idempotent_hint for tool in tools.values() if tool.annotations is not None)
assert all(
tool.annotations.open_world_hint is False for tool in tools.values() if tool.annotations is not None
)
@pytest.mark.asyncio
async def test_searches_skill_metadata_without_loading_content(self, mcp_session_factory) -> None:
"""Ensures search returns bounded canonical skill pointers ranked by metadata."""
async with mcp_session_factory() as mcp_session:
result = await mcp_session.call_tool(
"search_skills",
{"query": "FastMCP protocol", "limit": 1},
)
assert result.is_error is False
assert result.structured_content == {
"results": [
{
"name": "mcp-details",
"description": (
"Reference hub for MCP and FastMCP source documentation links. Use when you need "
"authoritative protocol, SDK, transport, and deployment docs without loading broad "
"implementation guidance."
),
"uri": "skill://mcp-details/SKILL.md",
}
]
}
tool_names = {tool.name for tool in result.tools}
assert "search_skills" not in tool_names
assert "list_resources" not in tool_names
assert "read_resource" not in tool_names
class TestResources:
"""Covers native skill resources, manifests, and file templates."""