jira_add_comment
Add comments to Jira issues to provide updates, share information, or document progress on tickets.
Instructions
Add a comment to a Jira issue
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issueKey | Yes | The Jira issue key | |
| body | Yes | Comment body |
Implementation Reference
- src/index.ts:1027-1033 (handler)MCP tool handler for jira_add_comment: parses input arguments using AddCommentSchema, calls jiraClient.addComment(issueKey, body), and returns the created comment as JSON.case "jira_add_comment": { const { issueKey, body } = AddCommentSchema.parse(args); const comment = await jiraClient.addComment(issueKey, body); return { content: [{ type: "text", text: JSON.stringify(comment, null, 2) }], }; }
- src/index.ts:71-74 (schema)Zod input schema definition for validating tool arguments: issueKey (string) and body (string).const AddCommentSchema = z.object({ issueKey: z.string().describe("The Jira issue key"), body: z.string().describe("Comment body"), });
- src/index.ts:335-346 (registration)Tool registration entry in the ListTools response, defining name, description, and input schema.{ name: "jira_add_comment", description: "Add a comment to a Jira issue", inputSchema: { type: "object", properties: { issueKey: { type: "string", description: "The Jira issue key" }, body: { type: "string", description: "Comment body" }, }, required: ["issueKey", "body"], }, },
- src/jira-client.ts:136-141 (helper)Core implementation in JiraClient: POST request to Jira REST API /rest/api/2/issue/{issueKey}/comment with body payload.async addComment(issueKey: string, body: string): Promise<JiraComment> { return this.request<JiraComment>(`/issue/${issueKey}/comment`, { method: "POST", body: JSON.stringify({ body }), }); }