Skip to main content
Glama

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
NameRequiredDescriptionDefault
issueKeyYesThe Jira issue key
bodyYesComment body

Implementation Reference

  • 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) }],
      };
    }
  • 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"],
      },
    },
  • 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 }),
      });
    }

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/yogeshhrathod/JiraMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server