Skip to main content
Glama
nulab

Backlog MCP Server

get_issue_comments

Retrieve comments for a Backlog issue using issue ID or key, with options to filter by comment ID range, limit results, and sort order.

Instructions

Returns list of comments for an issue

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
issueIdNoThe numeric ID of the issue (e.g., 12345)
issueKeyNoThe key of the issue (e.g., 'PROJ-123')
minIdNoMinimum comment ID
maxIdNoMaximum comment ID
countNoNumber of comments to retrieve
orderNoSort order

Implementation Reference

  • The main tool definition including the handler function that implements the logic for 'get_issue_comments' by resolving the issue identifier and calling the Backlog API to retrieve comments.
    export const getIssueCommentsTool = (
      backlog: Backlog,
      { t }: TranslationHelper
    ): ToolDefinition<
      ReturnType<typeof getIssueCommentsSchema>,
      (typeof IssueCommentSchema)['shape']
    > => {
      return {
        name: 'get_issue_comments',
        description: t(
          'TOOL_GET_ISSUE_COMMENTS_DESCRIPTION',
          'Returns list of comments for an issue'
        ),
        schema: z.object(getIssueCommentsSchema(t)),
        outputSchema: IssueCommentSchema,
        handler: async ({ issueId, issueKey, ...params }) => {
          const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t);
          if (!result.ok) {
            throw result.error;
          }
          return backlog.getIssueComments(result.value, params);
        },
      };
    };
  • Zod schema defining the input parameters for the get_issue_comments tool, including issueId or issueKey, optional filters like minId, maxId, count, and order.
    const getIssueCommentsSchema = buildToolSchema((t) => ({
      issueId: z
        .number()
        .optional()
        .describe(
          t(
            'TOOL_GET_ISSUE_COMMENTS_ISSUE_ID',
            'The numeric ID of the issue (e.g., 12345)'
          )
        ),
      issueKey: z
        .string()
        .optional()
        .describe(
          t(
            'TOOL_GET_ISSUE_COMMENTS_ISSUE_KEY',
            "The key of the issue (e.g., 'PROJ-123')"
          )
        ),
      minId: z
        .number()
        .optional()
        .describe(t('TOOL_GET_ISSUE_COMMENTS_MIN_ID', 'Minimum comment ID')),
      maxId: z
        .number()
        .optional()
        .describe(t('TOOL_GET_ISSUE_COMMENTS_MAX_ID', 'Maximum comment ID')),
      count: z
        .number()
        .optional()
        .describe(
          t('TOOL_GET_ISSUE_COMMENTS_COUNT', 'Number of comments to retrieve')
        ),
      order: z
        .enum(['asc', 'desc'])
        .optional()
        .describe(t('TOOL_GET_ISSUE_COMMENTS_ORDER', 'Sort order')),
    }));
  • The getIssueCommentsTool is registered in the 'issue' toolset group within the allTools export.
      getIssueTool(backlog, helper),
      getIssuesTool(backlog, helper),
      countIssuesTool(backlog, helper),
      addIssueTool(backlog, helper),
      updateIssueTool(backlog, helper),
      deleteIssueTool(backlog, helper),
      getIssueCommentsTool(backlog, helper),
      addIssueCommentTool(backlog, helper),
      getPrioritiesTool(backlog, helper),
      getCategoriesTool(backlog, helper),
      getCustomFieldsTool(backlog, helper),
      getIssueTypesTool(backlog, helper),
      getResolutionsTool(backlog, helper),
      getWatchingListItemsTool(backlog, helper),
      getWatchingListCountTool(backlog, helper),
      addWatchingTool(backlog, helper),
      updateWatchingTool(backlog, helper),
      deleteWatchingTool(backlog, helper),
      markWatchingAsReadTool(backlog, helper),
      getVersionMilestoneListTool(backlog, helper),
      addVersionMilestoneTool(backlog, helper),
      updateVersionMilestoneTool(backlog, helper),
      deleteVersionTool(backlog, helper),
    ],
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. It states it 'Returns list of comments' but doesn't disclose critical behavioral traits like whether it's paginated, what authentication is required, rate limits, error conditions, or what the return format looks like (e.g., JSON structure). This is inadequate for a tool with 6 parameters.

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, clear sentence with zero wasted words. It's appropriately sized for a straightforward retrieval tool and front-loads the core functionality immediately.

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 the tool has 6 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return values, error handling, or behavioral constraints. For a data retrieval tool with filtering parameters, more context about what the output looks like and how parameters interact is needed.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description adds no additional parameter semantics beyond implying it retrieves comments for an issue. This meets the baseline of 3 when schema coverage is high.

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 ('Returns') and resource ('list of comments for an issue'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_issue' or 'get_pull_request_comments', which would require a 5.

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 'get_pull_request_comments' (for similar functionality on pull requests), there's no indication of when this specific comment-retrieval tool is appropriate.

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/nulab/backlog-mcp-server'

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