Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

list_issue_comments

Retrieve all comments from a GitHub issue to track discussions and gather feedback for project management.

Instructions

List all comments on a GitHub issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueNumberYes
perPageNo

Implementation Reference

  • The core handler function that executes the tool logic by calling the GitHub API to list comments for a specific issue.
    async listIssueComments(data: {
      issueNumber: number;
      perPage?: number;
    }): Promise<Array<{ 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.listComments({
          owner: config.owner,
          repo: config.repo,
          issue_number: data.issueNumber,
          per_page: data.perPage || 100
        });
    
        return response.data.map(comment => ({
          id: comment.id,
          body: comment.body || '',
          user: comment.user?.login || 'unknown',
          createdAt: comment.created_at,
          updatedAt: comment.updated_at
        }));
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • Tool definition including name, description, input schema, and usage examples.
    export const listIssueCommentsTool: ToolDefinition<ListIssueCommentsArgs> = {
      name: "list_issue_comments",
      description: "List all comments on a GitHub issue",
      schema: listIssueCommentsSchema as unknown as ToolSchema<ListIssueCommentsArgs>,
      examples: [
        {
          name: "Get all comments",
          description: "Retrieve all comments for an issue",
          args: {
            issueNumber: 42
          }
        },
        {
          name: "Get recent comments",
          description: "Retrieve the 20 most recent comments",
          args: {
            issueNumber: 42,
            perPage: 20
          }
        }
      ]
    };
  • Zod schema for input validation defining required issueNumber and optional perPage.
    export const listIssueCommentsSchema = z.object({
      issueNumber: z.number().int().positive("Issue number must be a positive integer"),
      perPage: z.number().int().positive().max(100).default(100).optional(),
    });
    
    export type ListIssueCommentsArgs = z.infer<typeof listIssueCommentsSchema>;
  • Registration of the listIssueCommentsTool in the central ToolRegistry singleton.
    this.registerTool(listIssueCommentsTool);
  • MCP server request handler that dispatches tool calls to the ProjectManagementService.
    case "list_issue_comments":
      return await this.service.listIssueComments(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. While 'List all comments' implies a read-only operation, it doesn't disclose important behavioral aspects like pagination behavior (implied by the 'perPage' parameter), authentication requirements, rate limits, error conditions, or what 'all' means in practice (e.g., chronological order, filtering capabilities).

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 simple listing operation and gets straight to the point with zero waste.

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 tool with 2 parameters (one required), no annotations, no output schema, and 0% schema description coverage, the description is inadequate. It doesn't explain parameter usage, return format, pagination, error handling, or how it differs from related tools. The agent would struggle to use this effectively without additional context.

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?

With 0% schema description coverage for both parameters, the description provides no semantic information about 'issueNumber' (what format? repository context?) or 'perPage' (what values are valid? default behavior?). The description mentions 'all comments' which implies the tool returns comments, but doesn't explain how parameters affect this behavior.

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 tool's purpose with a specific verb ('List') and resource ('comments on a GitHub issue'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'get_issue' or 'list_issues' which might also provide comment information, so it doesn't reach the highest 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. With sibling tools like 'get_issue' (which might include comments) and 'create_issue_comment' (for adding comments), there's no indication of when this specific listing tool is preferred or what its scope limitations might be.

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