Skip to content

feat(resources): replace version_tool with mapbox://version resource#136

Merged
mattpodwysocki merged 1 commit intomainfrom
feat/version-resource
Mar 5, 2026
Merged

feat(resources): replace version_tool with mapbox://version resource#136
mattpodwysocki merged 1 commit intomainfrom
feat/version-resource

Conversation

@mattpodwysocki
Copy link
Contributor

Summary

version_tool occupied a slot in the tool list sent to the LLM on every request, burning tokens for something that's almost never needed during normal use. The MCP protocol already exposes server metadata during initialization handshake.

This PR replaces it with a mapbox://version resource:

  • Zero token overhead — not in the tool list
  • Still accessible when needed via readResource('mapbox://version')
  • Returns the same data: version, git SHA, tag, branch

Changes

  • Deleted src/tools/version-tool/ and tests
  • Removed from CORE_TOOLS and src/tools/index.ts
  • Added src/resources/version/VersionResource.ts at mapbox://version
  • Registered in resourceRegistry.ts and resources/index.ts

Test plan

  • npm run build passes
  • npm test passes (611 tests)
  • readResource('mapbox://version') returns version JSON in a client

🤖 Generated with Claude Code

@mattpodwysocki mattpodwysocki requested a review from a team as a code owner March 4, 2026 22:55
@ctufts
Copy link
Contributor

ctufts commented Mar 5, 2026

Assume this would constitute a major version release given it is a breaking change? If so, are there other changes we'd want to pack into a major release? If that is the case would it be better to start a feature branch for those changes until they are ready to go out.

version_tool occupied a tool slot on every request without providing
meaningful value during normal use. Version info is now available as
a MCP resource at mapbox://version — zero token overhead, still
accessible when needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mattpodwysocki mattpodwysocki force-pushed the feat/version-resource branch from dcde2b3 to b9abcf8 Compare March 5, 2026 15:28
Copy link
Contributor

@ctufts ctufts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as per offline convo about versioning

@mattpodwysocki mattpodwysocki merged commit 98c71d8 into main Mar 5, 2026
5 checks passed
@mattpodwysocki mattpodwysocki deleted the feat/version-resource branch March 5, 2026 16:12
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.

2 participants