Skip to main content
Glama

delete_release

Remove specific GitHub repository releases by providing owner, repo, and release ID. Streamlines version management and clean-up tasks for better repository organization.

Instructions

Delete a release from a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
release_idYesThe ID of the release
repoYesRepository name

Implementation Reference

  • The core handler function that executes the logic to delete a GitHub release by making a DELETE request to the GitHub API.
    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", } ); }
  • Input schema for the delete_release tool, defining parameters owner, repo, and release_id.
    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") });
  • src/index.ts:174-178 (registration)
    Registration of the delete_release tool in the MCP server's list of tools, including name, description, and input schema.
    { name: "delete_release", description: "Delete a release from a GitHub repository", inputSchema: zodToJsonSchema(releases.DeleteReleaseSchema), },
  • Dispatcher handler in the main tool call switch statement that parses arguments and invokes the deleteRelease function.
    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) }], }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/MissionSquad/mcp-github'

If you have feedback or need assistance with the MCP directory API, please join our Discord server