Skip to main content
Glama

dismiss_pull_request_review

Dismiss a pull request review by providing a dismissal message, removing the review's approval or request for changes status.

Instructions

Dismiss a pull request review

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner (username or organization)
repoYesRepository name
pull_numberYesPull request number
review_idYesThe ID of the review
messageYesThe message explaining why the review was dismissed

Implementation Reference

  • The main handler function that executes the tool logic by making a PUT request to the GitHub API endpoint for dismissing a pull request review.
    export async function dismissPullRequestReview(
      github_pat: string,
      owner: string,
      repo: string,
      pullNumber: number,
      reviewId: number,
      message: string
    ): Promise<z.infer<typeof PullRequestReviewSchema>> {
      const response = await githubRequest(
        github_pat,
        `https://api.github.com/repos/${owner}/${repo}/pulls/${pullNumber}/reviews/${reviewId}/dismissals`,
        {
          method: 'PUT',
          body: {
            message,
          },
        }
      );
      return PullRequestReviewSchema.parse(response);
    }
  • Public Zod input schema for the tool, defining parameters like owner, repo, pull_number, review_id, and message.
    export const DismissPullRequestReviewSchema = 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"),
      message: z.string().describe("The message explaining why the review was dismissed")
    });
  • Internal Zod schema extending the public schema to include the required GitHub Personal Access Token.
    export const _DismissPullRequestReviewSchema = DismissPullRequestReviewSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • src/index.ts:206-209 (registration)
    Tool registration in the MCP server's list of tools, providing name, description, and converted input schema.
      name: "dismiss_pull_request_review",
      description: "Dismiss a pull request review",
      inputSchema: zodToJsonSchema(pulls.DismissPullRequestReviewSchema),
    },
  • src/index.ts:608-617 (registration)
    Dispatch handler in the MCP server's CallToolRequest that parses arguments and invokes the dismissPullRequestReview function.
    case "dismiss_pull_request_review": {
      const args = pulls._DismissPullRequestReviewSchema.parse(params.arguments);
      const { github_pat, owner, repo, pull_number, review_id, message } = args;
      const result = await pulls.dismissPullRequestReview(
        github_pat, owner, repo, pull_number, review_id, message
      );
      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 for behavioral disclosure. 'Dismiss' implies a mutation operation, but the description doesn't specify whether this is reversible, what permissions are required, what happens to the review status, or any side effects. It lacks critical behavioral context for a mutation tool.

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 with zero wasted words. It's appropriately sized for a tool with good schema documentation and gets straight to the point 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?

For a mutation tool with 5 parameters and no annotations or output schema, the description is inadequate. It doesn't explain what 'dismiss' means operationally, what permissions are needed, what the tool returns, or how it differs from related review management tools. Significant contextual gaps remain.

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 all parameters are documented in the schema. The description adds no additional parameter semantics beyond what's already in the schema. This meets the baseline expectation when schema does the heavy lifting.

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 action ('dismiss') and target ('a pull request review'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'submit_pull_request_review' or explain what 'dismiss' means operationally (e.g., removing approval/rejection status).

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 about when to use this tool versus alternatives like 'submit_pull_request_review' or other review management tools. The description doesn't mention prerequisites (e.g., needing admin/reviewer permissions) or contextual constraints for dismissing reviews.

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