Skip to content

test: snapshot tools/list in api/mcp-tools.json - #11

Merged
subpathdev merged 1 commit into
mainfrom
test/tools-snapshot
Nov 30, 2026
Merged

subpathdev merged 1 commit into
mainfrom
test/tools-snapshot

Conversation

@subpathdev

Copy link
Copy Markdown
Owner

What

  • api/mcp-tools.json: the tools/list result (9 tools with descriptions, annotations and input schemas), as JSON.
  • TestToolsMatchSnapshot in internal/mcpserver compares the live tools/list with the file. -update rewrites it:
    go test ./internal/mcpserver -run TestToolsMatchSnapshot -update
  • It replaces TestToolList, which only checked the tool names.
  • README: link from the Tools section, one line in Development.

Why

The file is the MCP API definition the lab catalog (Backstage, spec.type: mcp) shows for spotify-mcp. Same path and flag as Morgentraining's MCP snapshot, so every MCP server in the lab follows one convention. A change to a tool now shows up as a reviewed diff.

Verified

  • go build ./..., go vet ./..., go test -race ./...
  • golangci-lint run v2.15.0 (the CI version, via podman): 0 issues
  • The test fails when the file differs (checked by editing one description).
  • The snapshot contains no hostnames.

Note

Renovate's go-sdk update (#10) may change the generated schemas. If it does, its CI fails on this test until the snapshot is refreshed with -update on that branch, which is the intended effect.

🤖 Generated with Claude Code

TestToolsMatchSnapshot compares the tools/list result with the checked-in
api/mcp-tools.json and rewrites it with -update. The file is the MCP API
definition for the lab catalog, so a change to a tool's name, description
or schema shows up as a reviewed diff. It replaces TestToolList, which
only checked the tool names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@subpathdev
subpathdev merged commit 53d7cc4 into main Nov 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant