Skip to main content
Glama

submit_pull_request_review

Submit a pull request review to approve, request changes, or comment on GitHub code changes. Use this tool to provide feedback on pull requests within repositories.

Instructions

Submit a pull request review (approve, request changes, or comment)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
pull_numberYesPull request number
review_idYesThe ID of the review
eventYesThe review action to perform
bodyNoThe body text of the review submission

Implementation Reference

  • The core handler function that executes the tool logic by making a POST request to the GitHub API to submit a pull request review.
    export async function submitPullRequestReview(
      github_pat: string,
      owner: string,
      repo: string,
      pullNumber: number,
      reviewId: number,
      event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT',
      body?: string
    ): Promise<z.infer<typeof PullRequestReviewSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/repos/${owner}/${repo}/pulls/${pullNumber}/reviews/${reviewId}/events`,
        {
          method: 'POST',
          body: {
            event,
            body,
          },
        }
      );
      return PullRequestReviewSchema.parse(response);
    }
  • Input schema definitions for validating the tool parameters, including the public schema and internal schema with GitHub PAT.
    export const SubmitPullRequestReviewSchema = 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"),
      review_id: z.number().describe("The ID of the review"),
      event: z.enum(['APPROVE', 'REQUEST_CHANGES', 'COMMENT']).describe("The review action to perform"),
      body: z.string().optional().describe("The body text of the review submission")
    });
    
    export const _SubmitPullRequestReviewSchema = SubmitPullRequestReviewSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • src/index.ts:201-204 (registration)
    Tool registration in the list of available tools, defining name, description, and input schema.
      name: "submit_pull_request_review",
      description: "Submit a pull request review (approve, request changes, or comment)",
      inputSchema: zodToJsonSchema(pulls.SubmitPullRequestReviewSchema),
    },
  • src/index.ts:597-606 (registration)
    Dispatch handler in the switch statement that parses arguments and calls the submitPullRequestReview function.
    case "submit_pull_request_review": {
      const args = pulls._SubmitPullRequestReviewSchema.parse(params.arguments);
      const { github_pat, owner, repo, pull_number, review_id, event, body } = args;
      const result = await pulls.submitPullRequestReview(
        github_pat, owner, repo, pull_number, review_id, event, body
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, 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 offers minimal behavioral insight. It mentions the three event types but doesn't disclose that this is a mutation operation (submitting implies writing), what permissions are required, whether it's idempotent, or what happens on success/failure. For a tool with 6 parameters and no annotations, this is inadequate.

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 front-loads the core action. Every word earns its place, with no redundancy or fluff.

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?

For a mutation tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain the tool's effect (e.g., that it finalizes a review), required permissions, error conditions, or return values. The 100% schema coverage helps but doesn't compensate for the lack of behavioral context.

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 parameters. The description adds no parameter-specific information beyond implying 'event' has three possible values (already in the schema enum). Baseline 3 is appropriate when the schema does all the work.

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 ('submit') and resource ('pull request review'), specifying the three possible actions (approve, request changes, or comment). It distinguishes from obvious siblings like 'create_pull_request_review' (which creates rather than submits) but doesn't explicitly differentiate from more distant siblings like 'dismiss_pull_request_review'.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing review ID from 'create_pull_request_review'), nor does it clarify when to choose this over other review-related tools like 'dismiss_pull_request_review'.

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

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