Open Context Protocol is live! 🚀 Read the launch post

updateComment

Update comment

Details

  • Method: PUT
  • Path: /rest/api/3/issue/{issueIdOrKey}/comment/{id}
  • Operation ID: updateComment

Parameters

{
  "issueIdOrKey": {
    "description": "The ID or key of the issue.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "id": {
    "description": "The ID of the comment.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "notifyUsers": {
    "description": "Whether users are notified when a comment is updated.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "overrideEditableFlag": {
    "description": "Whether screen security is overridden to enable uneditable fields to be edited. Available to Connect app users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) and Forge apps acting on behalf of users with *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about comments in the response. This parameter accepts `renderedBody`, which returns the comment body rendered in HTML.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "author": {
    "description": "The ID of the user who created the comment.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "body": {
    "description": "The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/).",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "created": {
    "description": "The date and time at which the comment was created.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "jsdAuthorCanSeeRequest": {
    "description": "Whether the comment was added from an email sent by a person who is not part of the issue. See [Allow external emails to be added as comments on issues](https://support.atlassian.com/jira-service-management-cloud/docs/allow-external-emails-to-be-added-as-comments-on-issues/)for information on setting up this feature.",
    "required": false,
    "location": "body",
    "type": "boolean"
  },
  "jsdPublic": {
    "description": "Whether the comment is visible in Jira Service Desk. Defaults to true when comments are created in the Jira Cloud Platform. This includes when the site doesn't use Jira Service Desk or the project isn't a Jira Service Desk project and, therefore, there is no Jira Service Desk for the issue to be visible on. To create a comment with its visibility in Jira Service Desk set to false, use the Jira Service Desk REST API [Create request comment](https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-issueIdOrKey-comment-post) operation.",
    "required": false,
    "location": "body",
    "type": "boolean"
  },
  "properties": {
    "description": "A list of comment properties. Optional on create and update.",
    "required": false,
    "location": "body",
    "type": "array"
  },
  "renderedBody": {
    "description": "The rendered version of the comment.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "self": {
    "description": "The URL of the comment.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "updateAuthor": {
    "description": "The ID of the user who updated the comment last.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "updated": {
    "description": "The date and time at which the comment was updated last.",
    "required": false,
    "location": "body",
    "type": "string"
  },
  "visibility": {
    "description": "The group or role to which this comment is visible. Optional on create and update.",
    "required": false,
    "location": "body",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": true,
  "description": "A comment.",
  "properties": {
    "author": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserDetails"
        }
      ],
      "description": "The ID of the user who created the comment.",
      "readOnly": true
    },
    "body": {
      "description": "The comment text in [Atlassian Document Format](https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/)."
    },
    "created": {
      "description": "The date and time at which the comment was created.",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "id": {
      "description": "The ID of the comment.",
      "readOnly": true,
      "type": "string"
    },
    "jsdAuthorCanSeeRequest": {
      "description": "Whether the comment was added from an email sent by a person who is not part of the issue. See [Allow external emails to be added as comments on issues](https://support.atlassian.com/jira-service-management-cloud/docs/allow-external-emails-to-be-added-as-comments-on-issues/)for information on setting up this feature.",
      "readOnly": true,
      "type": "boolean"
    },
    "jsdPublic": {
      "description": "Whether the comment is visible in Jira Service Desk. Defaults to true when comments are created in the Jira Cloud Platform. This includes when the site doesn't use Jira Service Desk or the project isn't a Jira Service Desk project and, therefore, there is no Jira Service Desk for the issue to be visible on. To create a comment with its visibility in Jira Service Desk set to false, use the Jira Service Desk REST API [Create request comment](https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-issueIdOrKey-comment-post) operation.",
      "readOnly": true,
      "type": "boolean"
    },
    "properties": {
      "description": "A list of comment properties. Optional on create and update.",
      "items": {
        "additionalProperties": false,
        "description": "An entity property, for more information see [Entity properties](https://developer.atlassian.com/cloud/jira/platform/jira-entity-properties/).",
        "properties": {
          "key": {
            "description": "The key of the property. Required on create and update.",
            "type": "string"
          },
          "value": {
            "description": "The value of the property. Required on create and update."
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "renderedBody": {
      "description": "The rendered version of the comment.",
      "readOnly": true,
      "type": "string"
    },
    "self": {
      "description": "The URL of the comment.",
      "readOnly": true,
      "type": "string"
    },
    "updateAuthor": {
      "allOf": [
        {
          "$ref": "#/components/schemas/UserDetails"
        }
      ],
      "description": "The ID of the user who updated the comment last.",
      "readOnly": true
    },
    "updated": {
      "description": "The date and time at which the comment was updated last.",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "visibility": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Visibility"
        }
      ],
      "description": "The group or role to which this comment is visible. Optional on create and update."
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('updateComment', {
    # Add required parameters here
})