Skip to main content
Glama

update_pull_request_comment

Modify existing comments on pull requests in Backlog projects to correct information, add updates, or clarify feedback.

Instructions

Updates a comment on 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 name
numberYesPull request number
commentIdYesComment ID
contentYesComment content

Implementation Reference

  • The async handler function that resolves project and repository identifiers using helper functions, then invokes backlog.patchPullRequestComments to update the specified pull request comment with new content.
    handler: async ({ projectId, projectKey, repoId, repoName, number, commentId, content, }) => { 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.patchPullRequestComments( result.value, String(repoResult.value), number, commentId, { content } ); },
  • Zod schema defining the input parameters for the update_pull_request_comment tool, including optional project/repo identifiers and required PR number, comment ID, and content.
    const updatePullRequestCommentSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_COMMENT_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_COMMENT_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), repoId: z .number() .optional() .describe(t('TOOL_UPDATE_PULL_REQUEST_COMMENT_REPO_ID', 'Repository ID')), repoName: z .string() .optional() .describe( t('TOOL_UPDATE_PULL_REQUEST_COMMENT_REPO_NAME', 'Repository name') ), number: z .number() .describe( t('TOOL_UPDATE_PULL_REQUEST_COMMENT_NUMBER', 'Pull request number') ), commentId: z .number() .describe(t('TOOL_UPDATE_PULL_REQUEST_COMMENT_COMMENT_ID', 'Comment ID')), content: z .string() .describe(t('TOOL_UPDATE_PULL_REQUEST_COMMENT_CONTENT', 'Comment content')), }));
  • Invocation of updatePullRequestCommentTool factory function to register the tool within the 'git' toolset group.
    updatePullRequestCommentTool(backlog, helper),
  • Import statement for the updatePullRequestCommentTool factory from its dedicated module.
    import { updatePullRequestCommentTool } from './updatePullRequestComment.js';
  • Reference to the shared PullRequestCommentSchema for output validation.
    outputSchema: PullRequestCommentSchema,

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