better tagging
This commit is contained in:
@@ -8,6 +8,7 @@ x-personal-mcp:
|
||||
- fastapi
|
||||
- sqlalchemy
|
||||
- async
|
||||
- asyncio
|
||||
- modernization
|
||||
capabilities:
|
||||
- resource://skills/fastapi-async-sqlalchemy-modernization/document
|
||||
|
||||
@@ -7,6 +7,7 @@ x-personal-mcp:
|
||||
tags:
|
||||
- fastapi
|
||||
- uv
|
||||
- uvicorn
|
||||
- docker
|
||||
capabilities:
|
||||
- resource://skills/fastapi-uv-docker/document
|
||||
|
||||
@@ -6,6 +6,7 @@ x-personal-mcp:
|
||||
version: 1.0.0
|
||||
tags:
|
||||
- nicegui
|
||||
- fastapi
|
||||
- ui
|
||||
- customization
|
||||
- frontend
|
||||
|
||||
@@ -8,6 +8,10 @@ x-personal-mcp:
|
||||
- pytest
|
||||
- testing
|
||||
- python
|
||||
- fastapi
|
||||
- asyncio
|
||||
- anyio
|
||||
- deterministic
|
||||
capabilities:
|
||||
- resource://skills/pytest-scaffolding/document
|
||||
---
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
pytestmark = pytest.mark.smoke
|
||||
@@ -28,6 +30,30 @@ TOOL_NAME_PARAMETERS = tuple(
|
||||
)
|
||||
|
||||
|
||||
SEARCH_QUERY_PARAMETERS = (
|
||||
pytest.param(
|
||||
"pytest",
|
||||
{"pytest-scaffolding"},
|
||||
id="query-pytest",
|
||||
),
|
||||
pytest.param(
|
||||
"asyncio",
|
||||
{"pytest-scaffolding", "fastapi-async-sqlalchemy-modernization"},
|
||||
id="query-asyncio",
|
||||
),
|
||||
pytest.param(
|
||||
"fastapi testing",
|
||||
{"pytest-scaffolding"},
|
||||
id="query-fastapi-testing",
|
||||
),
|
||||
pytest.param(
|
||||
"asyncio fastapi testing deterministic pytest",
|
||||
{"pytest-scaffolding"},
|
||||
id="query-composite-async-fastapi-testing-deterministic-pytest",
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
RESOURCE_URI_PARAMETERS = tuple(
|
||||
pytest.param(
|
||||
resource_uri,
|
||||
@@ -72,6 +98,35 @@ class TestMcpCatalogSurface:
|
||||
assert result.isError is False
|
||||
assert result.content
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("query", "expected_skill_ids"),
|
||||
SEARCH_QUERY_PARAMETERS,
|
||||
)
|
||||
@pytest.mark.asyncio
|
||||
async def test_search_patterns_matches_expected_skills_for_query_terms(
|
||||
self,
|
||||
mcp_session_factory,
|
||||
query: str,
|
||||
expected_skill_ids: set[str],
|
||||
) -> None:
|
||||
"""Ensures query terms return expected skill IDs from search_patterns."""
|
||||
async with mcp_session_factory() as mcp_session:
|
||||
result = await mcp_session.call_tool(
|
||||
"search_patterns",
|
||||
{
|
||||
"query": query,
|
||||
"limit": 20,
|
||||
},
|
||||
)
|
||||
|
||||
assert result.isError is False
|
||||
assert result.content
|
||||
|
||||
payload = json.loads(result.content[0].text)
|
||||
found_skill_ids = {pattern["id"] for pattern in payload["patterns"]}
|
||||
|
||||
assert expected_skill_ids.issubset(found_skill_ids)
|
||||
|
||||
class TestResources:
|
||||
"""Covers MCP resource and resource-template discovery."""
|
||||
|
||||
@@ -99,6 +154,18 @@ class TestMcpCatalogSurface:
|
||||
assert "resource://skills/{skill_id}/document" in template_uris
|
||||
assert "resource://prompts/{prompt_id}/document" in template_uris
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_reads_mcp_details_skill_document(self, mcp_session_factory) -> None:
|
||||
"""Ensures read_resource resolves the mcp-details skill document URI."""
|
||||
async with mcp_session_factory() as mcp_session:
|
||||
result = await mcp_session.call_tool(
|
||||
"read_resource",
|
||||
{"uri": "resource://skills/mcp-details/document"},
|
||||
)
|
||||
|
||||
assert result.isError is False
|
||||
assert result.content
|
||||
|
||||
class TestPrompts:
|
||||
"""Covers MCP prompt discovery surface."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user