create_pull_request_comment
Add comments to pull requests on AtomGit repositories to provide feedback, ask questions, or discuss code changes during code review.
Instructions
Create a comment on a pull request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repoOwner | Yes | ||
| repo | Yes | ||
| pull_number | Yes | ||
| body | Yes |
Implementation Reference
- operations/pull.ts:77-85 (handler)The core handler function that executes the tool logic by making an 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 defining the input parameters for 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)Registration of the tool in the MCP server's list of tools, including name, description, and schema.{ name: "create_pull_request_comment", description: "Create a comment on a pull request", inputSchema: zodToJsonSchema(pull.CreatePullRequestCommentSchema), },
- index.ts:397-403 (handler)MCP server request handler that dispatches the tool call by parsing arguments and invoking 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) }], }; }