Add create_release, update_release, delete_release, and generate_release_notes tools#2854
Open
Kowshik4593 wants to merge 1 commit into
Open
Add create_release, update_release, delete_release, and generate_release_notes tools#2854Kowshik4593 wants to merge 1 commit into
Kowshik4593 wants to merge 1 commit into
Conversation
…notes tools
Adds four tools that round out release management, which previously
only had read tools (list_releases, get_latest_release,
get_release_by_tag):
- create_release: POST /repos/{owner}/{repo}/releases
- update_release: PATCH /repos/{owner}/{repo}/releases/{release_id}
- delete_release: DELETE /repos/{owner}/{repo}/releases/{release_id}
(marked DestructiveHint, mirroring delete_file)
- generate_release_notes: POST /repos/{owner}/{repo}/releases/generate-notes,
a preview-only endpoint that generates release notes from merged PRs
without creating or modifying a release
update_release follows the same partial-update pattern as
update_pull_request (OptionalParamOK per field, no-op error if nothing
is provided).
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
Adds four tools that round out release management, which previously only had read tools (
list_releases,get_latest_release,get_release_by_tag).Why
Fixes #2853
Agents can currently read releases but not create, edit, delete them, or preview auto-generated release notes — so any release-management workflow has to drop out of MCP and into the GitHub UI partway through.
What changed
create_release(POST /repos/{owner}/{repo}/releases).update_release(PATCH /repos/{owner}/{repo}/releases/{release_id}), using the same "only send fields that were explicitly provided" pattern asupdate_pull_request.delete_release(DELETE /repos/{owner}/{repo}/releases/{release_id}), annotated withDestructiveHintlikedelete_file.generate_release_notes(POST /repos/{owner}/{repo}/releases/generate-notes), a preview-only endpoint that returns generated notes without creating or modifying a release.repostoolset (pkg/github/tools.go).pkg/github/repositories_test.go, plus mock endpoint constants inpkg/github/helper_test.go.pkg/github/__toolsnaps__/{create,update,delete}_release.snap,generate_release_notes.snap).README.mdviascript/generate-docs.MCP impact
Prompts tested (tool changes only)
create_releaseupdate_releasedelete_releasegenerate_release_notesSecurity / limits
All four tools require the
repoOAuth scope, consistent with the existing release read tools.delete_releaseis markedDestructiveHint: trueso clients can gate or confirm it. Write responses (create_release/update_release) carry the same repo-visibility/draft-state security label as the existing read tools (get_release_by_tag,list_releases), since a draft release is not world-readable even on a public repo.Tool renaming
Lint & tests
./script/lint(viagolangci-lint runat the CI-pinned v2.9.0)./script/test(go test ./...— full suite passes)Docs