Skip to main content
Glama

submit_pull_request_review

Submit a pull request review to approve, request changes, or add comments using specified repository details and review ID for GitHub repositories.

Instructions

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

Input Schema

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

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 definition for the submit_pull_request_review tool, including public schema and internal extended 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 MCP server's list of tools, specifying 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), },
  • MCP server request handler that parses arguments and delegates to 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) }], }; }

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