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

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Add a comment' implies a write/mutation operation, it doesn't disclose permission requirements, rate limits, whether comments are editable/deletable, or what happens on success/failure. For a mutation tool with zero annotation coverage, this is insufficient.

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 that states the core purpose without unnecessary words. It's appropriately sized for a straightforward tool and front-loads the essential information.

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?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain parameter meanings, behavioral implications, or what to expect upon execution. The context demands more comprehensive documentation than provided.

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%, meaning all 4 parameters are undocumented in the schema. The description provides no information about what 'owner', 'repo', 'issue_number', or 'body' mean, their formats, or constraints. It doesn't compensate for the complete lack of schema 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 its sibling 'update_issue', which might also handle comments, leaving room for ambiguity.

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 like 'update_issue' or 'create_issue'. It mentions 'existing issue' which implies a prerequisite, but doesn't explicitly state when-not-to-use scenarios or reference sibling tools for different contexts.

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/PhialsBasement/mcp-github-server-plus'

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