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) }],
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Create a comment' which implies a write operation, but doesn't disclose behavioral traits such as authentication requirements, rate limits, error handling, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's front-loaded and appropriately sized for the tool's function, making it easy to parse quickly. Every word contributes directly to stating the purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on parameters, behavior, output, and differentiation from siblings. The agent would struggle to use this tool correctly without additional context or trial-and-error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description adds no information about parameters like 'repoOwner', 'repo', 'pull_number', or 'body' (e.g., format, examples, constraints). It fails to compensate for the low coverage, leaving all 4 parameters undocumented in meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a comment on a pull request' clearly states the action (create) and target (comment on a pull request), which is better than a tautology. However, it doesn't distinguish this tool from its sibling 'create_pull_request_reply' or 'create_issue_comment', leaving ambiguity about when to use each. The purpose is understandable but lacks differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'create_pull_request_reply' or 'create_issue_comment'. The description implies usage for pull request comments but doesn't specify context, prerequisites, or exclusions. Without annotations or explicit instructions, the agent has minimal direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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