diff --git a/tests/registry/models/test_document_validation.py b/tests/registry/models/test_document_validation.py index 7842078..c1a9132 100644 --- a/tests/registry/models/test_document_validation.py +++ b/tests/registry/models/test_document_validation.py @@ -4,7 +4,7 @@ from pathlib import PurePosixPath import pytest -from personal_mcp.registry.models.common import parse_docs_path +from personal_mcp.registry.models import parse_docs_path pytestmark = pytest.mark.unit diff --git a/tests/registry/test_read.py b/tests/registry/test_read.py index 535db1e..ebb5092 100644 --- a/tests/registry/test_read.py +++ b/tests/registry/test_read.py @@ -1,9 +1,9 @@ from pathlib import PurePosixPath import pytest -from personal_mcp.registry.models.registry import DocsRegistry from personal_mcp.registry.load import read_docs_markdown_path +from personal_mcp.registry.models import DocsRegistry pytestmark = pytest.mark.unit diff --git a/tests/web/test_endpoint_connections.py b/tests/web/test_endpoint_connections.py index 3763baa..01e52ba 100644 --- a/tests/web/test_endpoint_connections.py +++ b/tests/web/test_endpoint_connections.py @@ -35,23 +35,15 @@ class TestMcpHttpEndpoints: """Covers MCP transport endpoint smoke behavior.""" @pytest.mark.asyncio - async def test_tools_bridge_native_skill_resources(self, mcp_session_factory) -> None: - """Ensures tool-only clients can discover and read native skill resources.""" + async def test_does_not_publish_legacy_resource_bridge_tools(self, mcp_session_factory) -> None: + """Ensures deprecated compatibility tools are not exposed on the MCP route.""" async with mcp_session_factory() as mcp_session: tools_result = await mcp_session.list_tools() - list_result = await mcp_session.call_tool("list_resources") - read_result = await mcp_session.call_tool( - "read_resource", - {"uri": "skill://mcp-details/SKILL.md"}, - ) - assert {tool.name for tool in tools_result.tools} == { - "list_resources", - "read_resource", - "search_skills", - } - assert "skill://mcp-details/SKILL.md" in list_result.content[0].text - assert "# MCP Details" in read_result.content[0].text + tool_names = {tool.name for tool in tools_result.tools} + assert "search_skills" not in tool_names + assert "list_resources" not in tool_names + assert "read_resource" not in tool_names @pytest.mark.asyncio async def test_accepts_initialize_jsonrpc_request( diff --git a/tests/web/test_mcp_prompts.py b/tests/web/test_mcp_prompts.py index a4764ac..2309df9 100644 --- a/tests/web/test_mcp_prompts.py +++ b/tests/web/test_mcp_prompts.py @@ -1,7 +1,7 @@ from __future__ import annotations import pytest -from mcp.types import PromptReference +from mcp_types import PromptReference pytestmark = pytest.mark.smoke diff --git a/tests/web/test_mcp_skills.py b/tests/web/test_mcp_skills.py index b6461bc..be1064b 100644 --- a/tests/web/test_mcp_skills.py +++ b/tests/web/test_mcp_skills.py @@ -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."""