Repository navigation
test: snapshot tools/list in api/mcp-tools.json - #11
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
api/mcp-tools.json: thetools/listresult (9 tools with descriptions, annotations and input schemas), as JSON.TestToolsMatchSnapshotininternal/mcpservercompares the livetools/listwith the file.-updaterewrites it:go test ./internal/mcpserver -run TestToolsMatchSnapshot -updateTestToolList, which only checked the tool names.Why
The file is the MCP API definition the lab catalog (Backstage,
spec.type: mcp) shows forspotify-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 runv2.15.0 (the CI version, via podman): 0 issuesNote
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
-updateon that branch, which is the intended effect.🤖 Generated with Claude Code