Skip to main content
Glama
PhialsBasement

GitHub MCP Server Plus

add_issue_comment

Add comments to GitHub issues to provide updates, answer questions, or track progress within repositories.

Instructions

Add a comment to an existing issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
repoYes
issue_numberYes
bodyYes

Implementation Reference

  • The core handler function that executes the GitHub API POST request to add a comment to the specified issue.
    export async function addIssueComment(
      owner: string,
      repo: string,
      issue_number: number,
      body: string
    ) {
      return githubRequest(`https://api.github.com/repos/${owner}/${repo}/issues/${issue_number}/comments`, {
        method: "POST",
        body: { body },
      });
    }
  • Zod schema defining the input parameters (owner, repo, issue_number, body) for the add_issue_comment tool.
    export const IssueCommentSchema = z.object({
      owner: z.string(),
      repo: z.string(),
      issue_number: z.number(),
      body: z.string(),
    });
  • index.ts:133-137 (registration)
    Registration of the add_issue_comment tool in the MCP server's list of tools, specifying name, description, and input schema.
    {
      name: "add_issue_comment",
      description: "Add a comment to an existing issue",
      inputSchema: zodToJsonSchema(issues.IssueCommentSchema)
    },
  • index.ts:326-333 (registration)
    Dispatch/execution handler in the CallToolRequest switch statement that parses arguments and calls the addIssueComment function.
    case "add_issue_comment": {
      const args = issues.IssueCommentSchema.parse(request.params.arguments);
      const { owner, repo, issue_number, body } = args;
      const result = await issues.addIssueComment(owner, repo, issue_number, body);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
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 for behavioral disclosure. While 'Add a comment' implies a write/mutation operation, the description doesn't address critical aspects like required permissions, rate limits, whether the comment is editable/deletable, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 zero wasted words. It's appropriately sized for a simple tool and front-loads the core purpose immediately. Every word earns its place in conveying the essential action.

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 a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It doesn't address parameter meanings, behavioral traits, or output expectations. While conciseness is good, the description lacks necessary context for the agent to use this tool effectively beyond basic inference from the name.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 4 parameters (owner, repo, issue_number, body) are documented in the schema. The description adds no parameter information beyond what's implied by the tool name ('issue' hints at issue_number). It doesn't explain what 'owner' and 'repo' refer to, the format of 'issue_number', or constraints on 'body'. This fails to compensate for the schema's lack of documentation.

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

Purpose4/5

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

The description clearly states the action ('Add a comment') and target resource ('to an existing issue'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential sibling tools like 'update_issue' or 'create_issue' that might also involve commenting functionality, which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., issue must exist), exclusions, or comparisons to sibling tools like 'update_issue' or 'get_issue' that might be relevant in different contexts. The agent receives minimal contextual direction.

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