From 4209244c30283263e0ec0da1f28e551e65f024f4 Mon Sep 17 00:00:00 2001 From: Joe Cardoso Date: Mon, 23 Mar 2026 12:20:55 -0300 Subject: [PATCH] fix: replace SKILL.md with TODO scaffold and make unit test wiring-only The template shipped a fully-populated SKILL.md with hardcoded list_items/get_item tool names, and test_skill_resource_readable asserted those names. This broke the build-mcpb pipeline at Phase 3 when tools were replaced with real ones but SKILL.md wasn't updated until Phase 5. SKILL.md is now a structural scaffold (frontmatter + section headings, no tool names). The unit test asserts the resource is non-empty and has the expected structure, without assuming any specific tool names. --- src/mcp_example/SKILL.md | 14 +++++++------- tests/test_server.py | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/mcp_example/SKILL.md b/src/mcp_example/SKILL.md index be43ee9..eb3760c 100644 --- a/src/mcp_example/SKILL.md +++ b/src/mcp_example/SKILL.md @@ -1,18 +1,18 @@ -# Example MCP Server — Skill Guide +--- +name: mcp-example-service +description: Provides knowledge of how to use MCP example most effectively. It's loaded into the agent's context when running the MCP. +--- ## Tools + | Tool | Use when... | |------|-------------| -| `list_items` | You need to browse or search items | -| `get_item` | You have an item ID and need full details | ## Context Reuse -- Use the `id` from `list_items` results when calling `get_item` + ## Workflows -### 1. Browse and Inspect -1. `list_items` with a limit to get an overview -2. For interesting items: `get_item` to get full details + diff --git a/tests/test_server.py b/tests/test_server.py index 3c0dd32..b26f80c 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -35,8 +35,8 @@ async def test_skill_resource_readable(self, mcp_server): async with Client(mcp_server) as client: contents = await client.read_resource("skill://example/usage") text = contents[0].text if hasattr(contents[0], "text") else str(contents[0]) - assert "list_items" in text - assert "get_item" in text + assert len(text.strip()) > 0 + assert "## Tools" in text @pytest.mark.asyncio async def test_skill_content_matches_constant(self, mcp_server):