Skip to main content
Glama

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), ],

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