better tagging
This commit is contained in:
@@ -8,6 +8,7 @@ x-personal-mcp:
|
|||||||
- fastapi
|
- fastapi
|
||||||
- sqlalchemy
|
- sqlalchemy
|
||||||
- async
|
- async
|
||||||
|
- asyncio
|
||||||
- modernization
|
- modernization
|
||||||
capabilities:
|
capabilities:
|
||||||
- resource://skills/fastapi-async-sqlalchemy-modernization/document
|
- resource://skills/fastapi-async-sqlalchemy-modernization/document
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ x-personal-mcp:
|
|||||||
tags:
|
tags:
|
||||||
- fastapi
|
- fastapi
|
||||||
- uv
|
- uv
|
||||||
|
- uvicorn
|
||||||
- docker
|
- docker
|
||||||
capabilities:
|
capabilities:
|
||||||
- resource://skills/fastapi-uv-docker/document
|
- resource://skills/fastapi-uv-docker/document
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ x-personal-mcp:
|
|||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
tags:
|
tags:
|
||||||
- nicegui
|
- nicegui
|
||||||
|
- fastapi
|
||||||
- ui
|
- ui
|
||||||
- customization
|
- customization
|
||||||
- frontend
|
- frontend
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ x-personal-mcp:
|
|||||||
- pytest
|
- pytest
|
||||||
- testing
|
- testing
|
||||||
- python
|
- python
|
||||||
|
- fastapi
|
||||||
|
- asyncio
|
||||||
|
- anyio
|
||||||
|
- deterministic
|
||||||
capabilities:
|
capabilities:
|
||||||
- resource://skills/pytest-scaffolding/document
|
- resource://skills/pytest-scaffolding/document
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
pytestmark = pytest.mark.smoke
|
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(
|
RESOURCE_URI_PARAMETERS = tuple(
|
||||||
pytest.param(
|
pytest.param(
|
||||||
resource_uri,
|
resource_uri,
|
||||||
@@ -72,6 +98,35 @@ class TestMcpCatalogSurface:
|
|||||||
assert result.isError is False
|
assert result.isError is False
|
||||||
assert result.content
|
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:
|
class TestResources:
|
||||||
"""Covers MCP resource and resource-template discovery."""
|
"""Covers MCP resource and resource-template discovery."""
|
||||||
|
|
||||||
@@ -99,6 +154,18 @@ class TestMcpCatalogSurface:
|
|||||||
assert "resource://skills/{skill_id}/document" in template_uris
|
assert "resource://skills/{skill_id}/document" in template_uris
|
||||||
assert "resource://prompts/{prompt_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:
|
class TestPrompts:
|
||||||
"""Covers MCP prompt discovery surface."""
|
"""Covers MCP prompt discovery surface."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user