Skip to main content
Glama

get_pull_request

Retrieve detailed information about a specific pull request by specifying the repository owner, repository name, and pull request number.

Instructions

Get details of a specific pull request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
pull_numberYesPull request number
repoYesRepository name

Implementation Reference

  • Core implementation of getPullRequest: fetches the pull request details from GitHub API using githubRequest and parses with GitHubPullRequestSchema.
    export async function getPullRequest( owner: string, repo: string, pullNumber: number ): Promise<z.infer<typeof GitHubPullRequestSchema>> { const response = await githubRequest( `https://api.github.com/repos/${owner}/${repo}/pulls/${pullNumber}` ); return GitHubPullRequestSchema.parse(response); }
  • Input schema (GetPullRequestSchema) defining parameters: owner, repo, pull_number.
    export const GetPullRequestSchema = z.object({ owner: z.string().describe("Repository owner (username or organization)"), repo: z.string().describe("Repository name"), pull_number: z.number().describe("Pull request number") });
  • index.ts:156-158 (registration)
    Tool registration in the list_tools handler, including name, description, and input schema.
    name: "get_pull_request", description: "Get details of a specific pull request", inputSchema: zodToJsonSchema(pulls.GetPullRequestSchema)
  • MCP CallToolRequest handler case that parses arguments and calls the core getPullRequest function.
    case "get_pull_request": { const args = pulls.GetPullRequestSchema.parse(request.params.arguments); const pullRequest = await pulls.getPullRequest(args.owner, args.repo, args.pull_number); return { content: [{ type: "text", text: JSON.stringify(pullRequest, 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/tuanle96/mcp-github'

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