Skip to main content
Glama
nulab

Backlog MCP Server

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,
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. 'Updates' implies mutation, but it doesn't specify permissions required, whether the update is reversible, rate limits, or what happens to the existing comment. This leaves significant behavioral questions unanswered for a mutation operation.

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 that states exactly what the tool does with zero wasted words. It's appropriately sized for a tool with good schema documentation and gets straight to the point.

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 mutation tool with 7 parameters and no annotations or output schema, the description is insufficient. It doesn't address behavioral aspects like authentication requirements, error conditions, or what the tool returns. The combination of mutation operation + no annotations + no output schema requires more comprehensive description.

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 7 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema, which meets the baseline expectation when schema coverage is complete.

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 verb ('Updates') and resource ('a comment on a pull request'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'update_issue' or 'update_pull_request', which would require more specificity to earn 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 'add_pull_request_comment' and 'update_pull_request', there's no indication of when this specific comment-update operation is appropriate versus creating new comments or updating the pull request itself.

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