Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

create_pull_request_review

Submit a review on a GitHub pull request to approve changes, request modifications, or add comments for code collaboration.

Instructions

Create a review on a pull request (approve, request changes, or comment)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pullNumberYes
bodyNo
eventYes
commentsNo

Implementation Reference

  • Core handler implementation that executes the GitHub API call to create a pull request review using Octokit
    async createPullRequestReview(data: {
      pullNumber: number;
      body?: string;
      event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT';
      comments?: Array<{
        path: string;
        position?: number;
        body: string;
      }>;
    }): Promise<{ id: number; user: string; state: string; body: string }> {
      try {
        const octokit = this.factory.getOctokit();
        const config = this.factory.getConfig();
    
        const response = await octokit.rest.pulls.createReview({
          owner: config.owner,
          repo: config.repo,
          pull_number: data.pullNumber,
          body: data.body,
          event: data.event,
          comments: data.comments
        });
    
        return {
          id: response.data.id,
          user: response.data.user?.login || 'unknown',
          state: response.data.state,
          body: response.data.body || ''
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Tool definition including Zod input schema, description, and usage examples for validation
    export const createPullRequestReviewTool: ToolDefinition<CreatePullRequestReviewArgs> = {
      name: "create_pull_request_review",
      description: "Create a review on a pull request (approve, request changes, or comment)",
      schema: createPullRequestReviewSchema as unknown as ToolSchema<CreatePullRequestReviewArgs>,
      examples: [
        {
          name: "Approve PR",
          description: "Approve a pull request",
          args: {
            pullNumber: 42,
            event: "APPROVE",
            body: "LGTM! Great work on the authentication implementation."
          }
        },
        {
          name: "Request changes",
          description: "Request changes with inline comments",
          args: {
            pullNumber: 42,
            event: "REQUEST_CHANGES",
            body: "Please address the comments below",
            comments: [
              {
                path: "src/auth.ts",
                position: 15,
                body: "Consider using bcrypt for password hashing"
              }
            ]
          }
        }
      ]
    };
  • Registers the create_pull_request_review tool in the central ToolRegistry
    this.registerTool(createPullRequestReviewTool);
  • Main tool dispatch handler that routes tool calls to the service implementation
    case "create_pull_request_review":
      return await this.service.createPullRequestReview(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