Skip to main content
Glama

get_pull_request_comments

Retrieve and manage comments for a specific pull request in Backlog projects to track feedback and discussions.

Instructions

Returns list of comments for a pull request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe numeric ID of the project (e.g., 12345)
projectKeyNoThe key of the project (e.g., 'PROJECT')
repoIdNoRepository ID
repoNameNoRepository ID
numberYesPull request number
minIdNoMinimum comment ID
maxIdNoMaximum comment ID
countNoNumber of comments to retrieve
orderNoSort order

Implementation Reference

  • The async handler function that resolves project and repository identifiers using utility functions and calls the Backlog client's getPullRequestComments method to retrieve the comments.
    handler: async ({ projectId, projectKey, repoId, repoName, number, ...params }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } const repoResult = resolveIdOrName( 'repository', { id: repoId, name: repoName }, t ); if (!repoResult.ok) { throw repoResult.error; } return backlog.getPullRequestComments( result.value, String(repoResult.value), number, params ); },
  • Input schema definition using Zod for parameters like project ID/key, repo ID/name, pull request number, and optional filters for comments.
    const getPullRequestCommentsSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_GET_PROJECT_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_GET_PROJECT_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), repoId: z .number() .optional() .describe( t('TOOL_GET_PULL_REQUEST_COMMENTS_REPO_ID_OR_NAME', 'Repository ID') ), repoName: z .string() .optional() .describe( t('TOOL_GET_PULL_REQUEST_COMMENTS_REPO_ID_OR_NAME', 'Repository name') ), number: z .number() .describe( t('TOOL_GET_PULL_REQUEST_COMMENTS_NUMBER', 'Pull request number') ), minId: z .number() .optional() .describe(t('TOOL_GET_PULL_REQUEST_COMMENTS_MIN_ID', 'Minimum comment ID')), maxId: z .number() .optional() .describe(t('TOOL_GET_PULL_REQUEST_COMMENTS_MAX_ID', 'Maximum comment ID')), count: z .number() .optional() .describe( t( 'TOOL_GET_PULL_REQUEST_COMMENTS_COUNT', 'Number of comments to retrieve' ) ), order: z .enum(['asc', 'desc']) .optional() .describe(t('TOOL_GET_PULL_REQUEST_COMMENTS_ORDER', 'Sort order')), }));
  • The tool is instantiated and registered in the 'git' toolset group within the allTools function.
    getPullRequestCommentsTool(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