Skip to content

Commit 7a3d534

Browse files
author
Scion Agent
committed
fix: update MCP media type and fix test assertion
- MCP media type: application/mcp-server+json → application/mcp-server-card+json (hf-discover migrated to the new canonical type) - Test assertion: match actual error message ("not allowed" vs "Invalid URL scheme")
1 parent deb62d1 commit 7a3d534

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/google/adk_community/tools/ardhf/ardhf_toolset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def _registry_search_url(registry_url: str) -> str:
7777

7878
_KIND_TO_MEDIA_TYPE: dict[str, str] = {
7979
"skill": "application/ai-skill",
80-
"mcp": "application/mcp-server+json",
80+
"mcp": "application/mcp-server-card+json",
8181
"space": "application/vnd.huggingface.space+json",
8282
"a2a": "application/a2a-agent-card+json",
8383
}
@@ -318,7 +318,7 @@ async def _search_ards(
318318
e.g. "remove image background" or "code review".
319319
artifact_type: Optional filter by artifact kind. Supported
320320
values: ``skill``, ``mcp``, ``space``, ``a2a``, or a raw
321-
media type like ``application/mcp-server+json``. When
321+
media type like ``application/mcp-server-card+json``. When
322322
omitted, all artifact types are returned.
323323
limit: Maximum number of results to return (1-100, default 10).
324324

tests/unittests/tools/ardhf/test_ardhf_toolset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ async def test_get_agent_card_rejects_file_url(self):
310310
)
311311

312312
assert "error" in result
313-
assert "Invalid URL scheme" in result["error"]
313+
assert "not allowed" in result["error"]
314314

315315
@pytest.mark.asyncio
316316
async def test_connect_agent_rejects_file_url(self):

0 commit comments

Comments
 (0)