Skip to content

feat(releases): add list_releases, get_release, and list_tags read tools#96

Merged
nemolize merged 2 commits into
mainfrom
feat/releases-phase1-read
Jun 11, 2026
Merged

feat(releases): add list_releases, get_release, and list_tags read tools#96
nemolize merged 2 commits into
mainfrom
feat/releases-phase1-read

Conversation

@nemolize

Copy link
Copy Markdown
Owner

Summary

Phase 1 (read) of the Releases & Tags feature area — the README comparison table marked it ❌ while both the official MCP server and gh cover 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 by release_id, by tag, 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, wrapTool error 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.

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.
Copilot AI review requested due to automatic review settings June 11, 2026 09:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.ts module 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.ts and 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.
@nemolize nemolize merged commit 944cf68 into main Jun 11, 2026
4 checks passed
@nemolize nemolize deleted the feat/releases-phase1-read branch June 11, 2026 09:28
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