dismiss_pull_request_review
Dismiss a GitHub pull request review by specifying the owner, repository, pull number, review ID, and a dismissal message. Use the MCP server to manage review dismissals efficiently.
Instructions
Dismiss a pull request review
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | The message explaining why the review was dismissed | |
| owner | Yes | Repository owner (username or organization) | |
| pull_number | Yes | Pull request number | |
| repo | Yes | Repository name | |
| review_id | Yes | The ID of the review |
Implementation Reference
- src/operations/pulls.ts:298-317 (handler)The core handler function that executes the tool logic by making a PUT request to the GitHub API to dismiss 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); }
- src/operations/pulls.ts:143-153 (schema)Input schema definitions (public and internal with PAT) for validating tool arguments.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") }); export const _DismissPullRequestReviewSchema = DismissPullRequestReviewSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
- src/index.ts:205-209 (registration)Tool registration in the list of available tools, including name, description, and input schema.{ name: "dismiss_pull_request_review", description: "Dismiss a pull request review", inputSchema: zodToJsonSchema(pulls.DismissPullRequestReviewSchema), },
- src/index.ts:608-617 (registration)Handler registration in the switch statement that dispatches tool calls to the pulls.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) }], }; }