Skip to main content
Glama

create_release

Automate GitHub release creation by specifying repository details, tag name, commitish, and release notes. Supports drafts, prereleases, and auto-generating release notes.

Instructions

Create a new release in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoText describing the release
draftNotrue to create a draft (unpublished) release, false to create a published one
generate_release_notesNoWhether to automatically generate the name and body for this release
nameNoThe name of the release
ownerYesRepository owner (username or organization)
prereleaseNotrue to identify the release as a prerelease, false to identify it as a full release
repoYesRepository name
tag_nameYesThe name of the tag
target_commitishNoSpecifies the commitish value that determines where the Git tag is created from

Implementation Reference

  • The core handler function that executes the create_release tool by sending a POST request to GitHub's releases API endpoint.
    export async function createRelease( github_pat: string, owner: string, repo: string, options: Omit<z.infer<typeof CreateReleaseSchema>, "owner" | "repo" | "github_pat"> ): Promise<z.infer<typeof ReleaseSchema>> { const response = await githubRequest( github_pat, `https://api.github.com/repos/${owner}/${repo}/releases`, { method: "POST", body: options, } ); return ReleaseSchema.parse(response); }
  • Zod schema defining the input parameters for creating a release, used for validation and JSON schema generation.
    export const CreateReleaseSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), tag_name: z.string().describe("The name of the tag"), target_commitish: z.string().optional().describe("Specifies the commitish value that determines where the Git tag is created from"), name: z.string().optional().describe("The name of the release"), body: z.string().optional().describe("Text describing the release"), draft: z.boolean().optional().describe("true to create a draft (unpublished) release, false to create a published one"), prerelease: z.boolean().optional().describe("true to identify the release as a prerelease, false to identify it as a full release"), generate_release_notes: z.boolean().optional().describe("Whether to automatically generate the name and body for this release") });
  • src/index.ts:165-168 (registration)
    Tool registration in the listTools handler, defining name, description, and input schema.
    name: "create_release", description: "Create a new release in a GitHub repository", inputSchema: zodToJsonSchema(releases.CreateReleaseSchema), },
  • Dispatch handler in the main CallToolRequest switch that parses arguments and delegates to the releases.createRelease function.
    case "create_release": { const args = releases._CreateReleaseSchema.parse(params.arguments); const { github_pat, owner, repo, ...options } = args; const result = await releases.createRelease(github_pat, owner, repo, options); return { content: [{ type: "text", text: JSON.stringify(result, 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