create_pull_request_comment
Add comments to a pull request on AtomGit repositories using repo owner, repository name, pull request number, and comment text to facilitate collaboration and feedback.
Instructions
Create a comment on a pull request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| pull_number | Yes | ||
| repo | Yes | ||
| repoOwner | Yes |
Implementation Reference
- operations/pull.ts:77-85 (handler)The core handler function that makes the AtomGit API request to create a pull request comment.export async function createPullRequestComment(repoOwner: string, repo: string, pull_number: number, body: string) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(repoOwner)}/${encodeURIComponent(repo)}/pulls/${encodeURIComponent(pull_number)}/comments`, { method: "POST", body: { body }, } ); }
- operations/pull.ts:23-28 (schema)Zod schema for input validation of the create_pull_request_comment tool.export const CreatePullRequestCommentSchema = z.object({ repoOwner: z.string(), repo: z.string(), pull_number: z.number(), body: z.string(), });
- index.ts:142-146 (registration)Tool registration in the MCP server's listTools handler, defining name, description, and input schema.{ name: "create_pull_request_comment", description: "Create a comment on a pull request", inputSchema: zodToJsonSchema(pull.CreatePullRequestCommentSchema), },
- index.ts:397-402 (handler)Dispatch handler in the MCP server's CallToolRequestSchema that parses args and calls the core handler.case "create_pull_request_comment": { const args = pull.CreatePullRequestCommentSchema.parse(request.params.arguments); const result = await pull.createPullRequestComment(args.repoOwner, args.repo, args.pull_number, args.body); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], };