Skip to main content
Glama

list_releases

Retrieve GitHub repository releases by specifying owner, repo, and pagination options. Ideal for tracking and managing release versions effectively.

Instructions

List releases for a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
pageNoPage number of the results
per_pageNoResults per page (max 100)
repoYesRepository name

Implementation Reference

  • Core handler function that queries the GitHub Releases API to list releases for a repository, supporting pagination.
    export async function listReleases( github_pat: string, owner: string, repo: string, options: { per_page?: number; page?: number } = {} ): Promise<z.infer<typeof ReleaseSchema>[]> { const url = new URL(`https://api.github.com/repos/${owner}/${repo}/releases`); if (options.per_page) url.searchParams.append("per_page", options.per_page.toString()); if (options.page) url.searchParams.append("page", options.page.toString()); const response = await githubRequest(github_pat, url.toString()); return z.array(ReleaseSchema).parse(response); }
  • Input schema for the list_releases tool defining parameters: owner, repo, per_page, page.
    export const ListReleasesSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), per_page: z.number().optional().describe("Results per page (max 100)"), page: z.number().optional().describe("Page number of the results") });
  • src/index.ts:169-173 (registration)
    Tool registration in the server's listTools handler, specifying name, description, and input schema.
    { name: "list_releases", description: "List releases for a GitHub repository", inputSchema: zodToJsonSchema(releases.ListReleasesSchema), },
  • src/index.ts:542-549 (registration)
    Dispatch handler in the CallToolRequest switch statement that parses arguments and invokes the listReleases function.
    case "list_releases": { const args = releases._ListReleasesSchema.parse(params.arguments); const { github_pat, owner, repo, ...options } = args; const result = await releases.listReleases(github_pat, owner, repo, options); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Extended internal schema used for parsing tool arguments, including the github_pat.
    export const _ListReleasesSchema = ListReleasesSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });

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