delete_release
Remove a release from a GitHub repository by specifying the owner, repository name, and release ID to manage project versioning.
Instructions
Delete a release from a GitHub repository
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | Repository owner (username or organization) | |
| repo | Yes | Repository name | |
| release_id | Yes | The ID of the release |
Implementation Reference
- src/operations/releases.ts:160-173 (handler)Core handler function that executes the DELETE request to the GitHub Releases API to delete the specified release.export async function deleteRelease( github_pat: string, owner: string, repo: string, release_id: number ): Promise<void> { await githubRequest( github_pat, `https://api.github.com/repos/${owner}/${repo}/releases/${release_id}`, { method: "DELETE", } ); }
- src/index.ts:551-557 (handler)MCP tool dispatcher case that parses arguments, calls the deleteRelease function, and returns success response.case "delete_release": { const args = releases._DeleteReleaseSchema.parse(params.arguments); await releases.deleteRelease(args.github_pat, args.owner, args.repo, args.release_id); return { content: [{ type: "text", text: JSON.stringify({ success: true }, null, 2) }], }; }
- src/operations/releases.ts:82-90 (schema)Zod schemas defining the input parameters for the delete_release tool, used for validation and JSON schema generation.export const DeleteReleaseSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), release_id: z.number().describe("The ID of the release") }); export const _DeleteReleaseSchema = DeleteReleaseSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
- src/index.ts:174-178 (registration)Tool registration in the list of tools provided by the MCP server.{ name: "delete_release", description: "Delete a release from a GitHub repository", inputSchema: zodToJsonSchema(releases.DeleteReleaseSchema), },