Skip to main content
Glama

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
NameRequiredDescriptionDefault
bodyYes
pull_numberYes
repoYes
repoOwnerYes

Implementation Reference

  • 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 }, } ); }
  • 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), },
  • 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) }], };

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/kaiyuanxiaobing/atomgit-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server