Skip to main content
Glama

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

Implementation Reference

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

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