Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

get_pull_request

Retrieve detailed information about a specific GitHub pull request by providing its number to support project management and code review workflows.

Instructions

Get details of a specific pull request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pullNumberYes

Implementation Reference

  • Core implementation of get_pull_request tool: fetches detailed pull request information using GitHub REST API via Octokit
    async getPullRequest(data: {
      pullNumber: number;
    }): Promise<{ number: number; title: string; body: string; state: string; user: string; createdAt: string; updatedAt: string; mergeable: boolean | null }> {
      try {
        const octokit = this.factory.getOctokit();
        const config = this.factory.getConfig();
    
        const response = await octokit.rest.pulls.get({
          owner: config.owner,
          repo: config.repo,
          pull_number: data.pullNumber
        });
    
        return {
          number: response.data.number,
          title: response.data.title,
          body: response.data.body || '',
          state: response.data.state,
          user: response.data.user?.login || 'unknown',
          createdAt: response.data.created_at,
          updatedAt: response.data.updated_at,
          mergeable: response.data.mergeable
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Tool definition including schema, description, and examples for get_pull_request
    export const getPullRequestTool: ToolDefinition<GetPullRequestArgs> = {
      name: "get_pull_request",
      description: "Get details of a specific pull request",
      schema: getPullRequestSchema as unknown as ToolSchema<GetPullRequestArgs>,
      examples: [
        {
          name: "Get PR details",
          description: "Retrieve information about PR #42",
          args: {
            pullNumber: 42
          }
        }
      ]
    };
  • Registration of getPullRequestTool in the central ToolRegistry during built-in tools initialization
    this.registerTool(createPullRequestTool);
    this.registerTool(getPullRequestTool);
    this.registerTool(listPullRequestsTool);
    this.registerTool(updatePullRequestTool);
    this.registerTool(mergePullRequestTool);
    this.registerTool(listPullRequestReviewsTool);
    this.registerTool(createPullRequestReviewTool);
  • MCP server dispatch handler that routes get_pull_request calls to ProjectManagementService.getPullRequest
    case "get_pull_request":
      return await this.service.getPullRequest(args);

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other 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/kunwarVivek/mcp-github-project-manager'

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