feat(releases): add list_releases, get_release, and list_tags read tools#96
Merged
Conversation
Phase 1 (read) of the Releases & Tags feature area. Adds a new releases tool module covering release listing, single-release detail (by ID, tag, or latest), and tag listing, so the server can answer "what shipped?" questions without leaving MCP. Write tools (create / update / delete release) are deferred to a later PR.
There was a problem hiding this comment.
Pull request overview
This PR adds Phase 1 (read-only) tools for the Releases & Tags feature area, bringing three new MCP tools: list_releases, get_release, and list_tags. The implementation follows the existing codebase conventions — server.registerTool 3-arg registration, wrapTool error handling, logRateLimit telemetry, and curated Markdown output per ADR-0003.
Changes:
- New
src/tools/releases.tsmodule implementing three read tools: list releases (with pagination), get a single release (by ID, tag, or latest), and list git tags - Comprehensive unit tests covering rendering, endpoint selection logic, mutual-exclusion validation, pagination hints, and empty-state handling
- Registration in
src/tools.tsand README documentation update reflecting the new partial coverage
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/tools/releases.ts | New module with list_releases, get_release, and list_tags tool implementations |
| test/releases.test.js | Unit tests covering all three tools and their edge cases |
| src/tools.ts | Imports and registers registerReleaseTools |
| README.md | Updates the feature comparison table and tool reference to include the new read tools |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
GitHub's `draft` and `prerelease` are independent boolean flags, so a release can be both simultaneously. The previous ternary treated `draft` as dominant and hid the prerelease facet. Expand `releaseState` to return "draft prerelease" when both are true.
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.
Summary
Phase 1 (read) of the Releases & Tags feature area — the README comparison table marked it ❌ while both the official MCP server and
ghcover it. Adds three read tools so the server can answer "what shipped?" questions:list_releases— releases newest first (ID, name, tag, draft / prerelease / published state, date, author)get_release— single release detail + notes body; polymorphic lookup byrelease_id, bytag, or the latest release when neither is given (latest follows GitHub semantics: never drafts / prereleases)list_tags— git tags (name, commit SHA)Write tools (
create_release/update_release/delete_release) are deferred to a Phase 2 PR. Release assets upload/download stays out of scope (binary handling, same reasoning as the artifacts metadata-only convention).Conventions follow the existing tool modules: curated Markdown output per ADR-0003,
wrapToolerror surfacing,logRateLimit, stubbed-Octokit unit tests.Test plan
Nothing beyond CI (unit tests cover rendering, endpoint selection, the mutual-exclusion guard, and empty/pagination cases). Live-API verification of the read tools is planned alongside the Phase 2 work via the handler-capture script flow.