Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

create_issue_comment

Add comments to GitHub issues to provide updates, ask questions, or share information within project workflows.

Instructions

Add a comment to a GitHub issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueNumberYes
bodyYes

Implementation Reference

  • The main handler function that executes the tool logic by calling the GitHub REST API to create a comment on the specified issue.
    async createIssueComment(data: {
      issueNumber: number;
      body: string;
    }): Promise<{ id: number; body: string; user: string; createdAt: string; updatedAt: string }> {
      try {
        const octokit = this.factory.getOctokit();
        const config = this.factory.getConfig();
    
        const response = await octokit.rest.issues.createComment({
          owner: config.owner,
          repo: config.repo,
          issue_number: data.issueNumber,
          body: data.body
        });
    
        return {
          id: response.data.id,
          body: response.data.body || '',
          user: response.data.user?.login || 'unknown',
          createdAt: response.data.created_at,
          updatedAt: response.data.updated_at
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Defines the tool schema, input validation using Zod, description, and usage examples for the create_issue_comment tool.
    export const createIssueCommentTool: ToolDefinition<CreateIssueCommentArgs> = {
      name: "create_issue_comment",
      description: "Add a comment to a GitHub issue",
      schema: createIssueCommentSchema as unknown as ToolSchema<CreateIssueCommentArgs>,
      examples: [
        {
          name: "Add status update comment",
          description: "Post a comment to update the team on progress",
          args: {
            issueNumber: 42,
            body: "Working on this issue now. Should have a PR ready by EOD."
          }
        }
      ]
    };
  • Registers the createIssueCommentTool (and related comment tools) in the central ToolRegistry during initialization.
    this.registerTool(createIssueCommentTool);
    this.registerTool(updateIssueCommentTool);
    this.registerTool(deleteIssueCommentTool);
    this.registerTool(listIssueCommentsTool);
  • src/index.ts:320-321 (registration)
    MCP server request handler dispatches call_tool requests for 'create_issue_comment' to the ProjectManagementService implementation.
    case "create_issue_comment":
      return await this.service.createIssueComment(args);
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. It states the action ('Add a comment') which implies a write operation, but doesn't cover permissions needed, rate limits, error conditions, or what happens on success (e.g., comment ID returned). This leaves significant gaps for a mutation tool.

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 gets straight to the point with zero wasted words. It's appropriately sized for a simple tool and front-loads the essential information without unnecessary elaboration.

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 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't address behavioral aspects like permissions or response format, leaving the agent with insufficient context to use the tool effectively beyond basic parameter inference.

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 description must compensate for undocumented parameters. It mentions 'a GitHub issue' which hints at 'issueNumber', and 'comment' which relates to 'body', but doesn't explain parameter formats (e.g., issueNumber as integer, body as markdown) or constraints. This adds minimal value beyond the schema's structure.

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 a GitHub issue'), making the purpose immediately understandable. It doesn't differentiate from siblings like 'update_issue_comment' or 'list_issue_comments', but it's specific enough to avoid confusion with unrelated tools.

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_comment' or 'delete_issue_comment', nor does it mention prerequisites such as issue existence or authentication requirements. It's a basic statement of function without contextual usage information.

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/kunwarVivek/mcp-github-project-manager'

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