Skip to main content
Glama

add_issue_comment

Add a comment to a GitHub issue by specifying the repository owner, repository name, issue number, and comment body. Facilitates issue tracking and collaboration directly within the platform.

Instructions

Add a comment to an existing issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
issue_numberYes
ownerYes
repoYes

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 for the add_issue_comment tool: owner, repo, issue_number, and body.
    export const IssueCommentSchema = z.object({
      owner: z.string(),
      repo: z.string(),
      issue_number: z.number(),
      body: z.string(),
    });
  • index.ts:130-134 (registration)
    Tool registration in the list of tools returned by ListToolsRequest, including name, description, and input schema.
    {
      name: "add_issue_comment",
      description: "Add a comment to an existing issue",
      inputSchema: zodToJsonSchema(issues.IssueCommentSchema)
    },
  • index.ts:459-466 (registration)
    Dispatch handler in the CallToolRequestSchema switch statement that validates input 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?

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.

Install Server

Other Tools

Related 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/tuanle96/mcp-github'

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