add_issue_comment
Add a comment to a Backlog issue, specify content, notify users, and include attachments for enhanced collaboration and issue tracking.
Instructions
Adds a comment to an issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attachmentId | No | Attachment IDs | |
| content | Yes | Comment content | |
| issueIdOrKey | Yes | Issue ID or issue key | |
| notifiedUserId | No | User IDs to notify |
Implementation Reference
- src/tools/addIssueComment.ts:54-70 (handler)The asynchronous handler function that resolves the issue ID or key using resolveIdOrKey and calls backlog.postIssueComments to add the comment.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, }); },
- src/tools/addIssueComment.ts:8-37 (schema)Input schema for the add_issue_comment tool, defining parameters like issueId/key, content, notified users, and attachments using Zod.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')), }));
- src/tools/tools.ts:95-95 (registration)The add_issue_comment tool is registered by calling addIssueCommentTool and adding it to the 'issue' toolset in the allTools function.addIssueCommentTool(backlog, helper),
- src/tools/tools.ts:5-5 (registration)Import of the addIssueCommentTool factory function.import { addIssueCommentTool } from './addIssueComment.js';