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) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but only states it 'gets details' without disclosing behavioral traits. It doesn't mention whether this is a read-only operation, requires authentication, has rate limits, returns specific data structures, or handles errors. This leaves significant gaps for an agent to understand how to use it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is incomplete for a tool with three parameters. It doesn't explain what details are returned (e.g., title, state, author), how errors are handled, or any behavioral context. For a retrieval tool in a GitHub context, this leaves too many unknowns for reliable agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all three parameters (owner, repo, pull_number) with clear descriptions. The description adds no additional meaning beyond implying these parameters identify a specific pull request, which is already obvious from the schema. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get details') and resource ('specific pull request'), making the purpose immediately understandable. It distinguishes this from sibling tools like 'list_pull_requests' (which lists multiple) and 'get_pull_request_comments' (which focuses on comments). However, it doesn't specify what details are included, leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing repository access), contrast with 'list_pull_requests' for multiple PRs, or specify scenarios where detailed PR information is required versus just status or files.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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