Skip to main content
Glama
nulab

Backlog MCP Server

add_issue_comment

Add comments to Backlog issues to provide updates, share information, or collaborate with team members on project tasks.

Instructions

Adds a comment to 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')
contentYesComment content
notifiedUserIdNoUser IDs to notify
attachmentIdNoAttachment IDs

Implementation Reference

  • The asynchronous handler function that resolves the issue identifier and posts a comment to the issue using the Backlog client, including optional notified users and attachments.
    handler: async ({
      issueId,
      issueKey,
      content,
      notifiedUserId,
      attachmentId,
    }) => {
      const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t);
      if (!result.ok) {
        throw result.error;
      }
      return backlog.postIssueComments(result.value, {
        content,
        notifiedUserId,
        attachmentId,
      });
    },
  • Zod schema defining the input parameters for the add_issue_comment tool: optional issue ID or key, required content, optional notified user IDs and attachment IDs.
    const addIssueCommentSchema = buildToolSchema((t) => ({
      issueId: z
        .number()
        .optional()
        .describe(
          t(
            'TOOL_ADD_ISSUE_COMMENT_ID',
            'The numeric ID of the issue (e.g., 12345)'
          )
        ),
      issueKey: z
        .string()
        .optional()
        .describe(
          t('TOOL_ADD_ISSUE_COMMENT_KEY', "The key of the issue (e.g., 'PROJ-123')")
        ),
      content: z
        .string()
        .describe(t('TOOL_ADD_ISSUE_COMMENT_CONTENT', 'Comment content')),
      notifiedUserId: z
        .array(z.number())
        .optional()
        .describe(
          t('TOOL_ADD_ISSUE_COMMENT_NOTIFIED_USER_ID', 'User IDs to notify')
        ),
      attachmentId: z
        .array(z.number())
        .optional()
        .describe(t('TOOL_ADD_ISSUE_COMMENT_ATTACHMENT_ID', 'Attachment IDs')),
    }));
  • Instantiation and registration of the addIssueCommentTool within the 'issue' toolset group in the allTools export.
    addIssueCommentTool(backlog, helper),
  • Tool schema (input wrapped in z.object) and output schema reference.
    schema: z.object(addIssueCommentSchema(t)),
    outputSchema: IssueCommentSchema,
  • Factory function exporting the complete ToolDefinition for 'add_issue_comment', including name, description, schemas, and handler.
    export const addIssueCommentTool = (
      backlog: Backlog,
      { t }: TranslationHelper
    ): ToolDefinition<
      ReturnType<typeof addIssueCommentSchema>,
      (typeof IssueCommentSchema)['shape']
    > => {
      return {
        name: 'add_issue_comment',
        description: t(
          'TOOL_ADD_ISSUE_COMMENT_DESCRIPTION',
          'Adds a comment to an issue'
        ),
        schema: z.object(addIssueCommentSchema(t)),
        outputSchema: IssueCommentSchema,
        handler: async ({
          issueId,
          issueKey,
          content,
          notifiedUserId,
          attachmentId,
        }) => {
          const result = resolveIdOrKey('issue', { id: issueId, key: issueKey }, t);
          if (!result.ok) {
            throw result.error;
          }
          return backlog.postIssueComments(result.value, {
            content,
            notifiedUserId,
            attachmentId,
          });
        },
      };
    };
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. It states this is an 'add' operation (implying mutation) but doesn't mention required permissions, whether comments are editable/deletable, rate limits, or what happens on success/failure. This leaves significant gaps for a mutation tool.

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, efficient sentence that communicates the core purpose without any wasted words. It's appropriately sized for a straightforward tool and front-loads the essential information.

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 no annotations and no output schema, the description is insufficient. It doesn't address behavioral aspects like permissions, side effects, or response format, leaving the agent with incomplete understanding of how to properly use this tool.

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 5 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, which meets the baseline expectation 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 action ('Adds a comment') and target resource ('to an issue'), providing specific verb+resource information. However, it doesn't differentiate from sibling tools like 'add_pull_request_comment' or 'get_issue_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?

No guidance is provided on when to use this tool versus alternatives like 'update_issue' or 'get_issue_comments'. The description only states what it does, not when it's appropriate or what prerequisites might exist.

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