> ## Documentation Index
> Fetch the complete documentation index at: https://docs.thena.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update comment

> MCP tool to update an existing comment in the Thena platform.

import Admonition from '@theme/Admonition';

### MCP tool: `update_comment`

Updates an existing comment with new content, visibility settings, or other properties. Useful for correcting typos, updating information, or changing comment visibility.

<Admonition type="note">
  You must provide the comment ID and at least the content to update the comment.
</Admonition>

### Example prompt

```prompt theme={null}
Update comment 60YJS01K10TQY9F7W3V19QZ857TFY with content "Updated: This comment has been modified to include more detailed information about the ticket status. The investigation is ongoing and we expect to have a resolution by end of day today. Thanks for your patience while we work through this performance issue."
```

<Admonition type="info">
  When you use this prompt in a chat with the model (with the MCP tool registered), the model will automatically call the <code>update\_comment</code> tool with the correct arguments.
</Admonition>

### Input parameters

| Name              | Type      | Required | Description                                              |
| ----------------- | --------- | -------- | -------------------------------------------------------- |
| commentId         | string    | Yes      | The ID of the comment to update                          |
| content           | string    | Yes      | The updated content of the comment (1-5000 chars)        |
| contentHtml       | string    | No       | The updated HTML content of the comment (max 5000 chars) |
| contentJson       | string    | No       | The updated JSON content of the comment                  |
| threadName        | string    | No       | The updated name of the comment thread                   |
| commentVisibility | enum      | No       | The visibility of the comment ("public" or "private")    |
| commentType       | enum      | No       | The type of the comment ("comment" or "note")            |
| isPinned          | boolean   | No       | Whether the comment is pinned                            |
| preserveMentions  | boolean   | No       | Whether to preserve mentions when updating content       |
| attachments       | string\[] | No       | The attachments of the comment                           |
| commentAs         | string    | No       | The comment as a string                                  |
| metadata          | object    | No       | The updated metadata of the comment                      |
| updatedAt         | string    | No       | The update timestamp                                     |

### Response fields

Below are the fields you may see in the response:

<table>
  <thead>
    <tr>
      <th>Field</th>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr><td>id</td><td>string</td><td>Comment unique ID</td></tr>
    <tr><td>content</td><td>string</td><td>Updated plain text content of the comment</td></tr>
    <tr><td>contentHtml</td><td>string</td><td>Updated HTML formatted content</td></tr>
    <tr><td>contentMarkdown</td><td>string</td><td>Updated Markdown formatted content</td></tr>
    <tr><td>contentJson</td><td>string</td><td>Updated JSON formatted content</td></tr>
    <tr><td>isEdited</td><td>boolean</td><td>Whether the comment has been edited</td></tr>
    <tr><td>threadName</td><td>string</td><td>Name of the comment thread</td></tr>
    <tr><td>commentVisibility</td><td>string</td><td>Updated visibility setting</td></tr>
    <tr><td>commentType</td><td>string</td><td>Updated type of comment</td></tr>
    <tr><td>isPinned</td><td>boolean</td><td>Whether the comment is pinned</td></tr>
    <tr><td>sourceEmailId</td><td>string</td><td>Email ID if comment came from email</td></tr>
    <tr><td>metadata</td><td>object</td><td>Updated metadata (may include mentions, lastEditedAt, lastEditedBy, etc.)</td></tr>
    <tr><td>createdAt</td><td>string (ISO8601)</td><td>Original creation timestamp</td></tr>
    <tr><td>updatedAt</td><td>string (ISO8601)</td><td>Last update timestamp</td></tr>
    <tr><td>author</td><td>string</td><td>Author display name</td></tr>
    <tr><td>authorAvatarUrl</td><td>string</td><td>Author's avatar URL</td></tr>
    <tr><td>attachments</td><td>array</td><td>Updated attachment IDs</td></tr>
    <tr><td>authorId</td><td>string</td><td>Author's user ID</td></tr>
    <tr><td>authorUserType</td><td>string</td><td>Author's user type (e.g., ORG\_ADMIN)</td></tr>
    <tr><td>impersonatedUserEmail</td><td>string</td><td>Email of impersonated user</td></tr>
    <tr><td>impersonatedUserName</td><td>string</td><td>Name of impersonated user</td></tr>
    <tr><td>impersonatedUserAvatar</td><td>string</td><td>Avatar of impersonated user</td></tr>
    <tr><td>deletedAt</td><td>string</td><td>Deletion timestamp (null if not deleted)</td></tr>
  </tbody>
</table>

### Sample response

```json theme={null}
{
  "data": {
    "id": "60YJS01K10TQY9F7W3V19QZ857TFY",
    "content": "Updated: This comment has been modified to include more detailed information about the ticket status. The investigation is ongoing and we expect to have a resolution by end of day today. Thanks for your patience while we work through this performance issue.",
    "contentHtml": "Updated: This comment has been modified to include more detailed information about the ticket status. The investigation is ongoing and we expect to have a resolution by end of day today. Thanks for your patience while we work through this performance issue.",
    "contentMarkdown": "Updated: This comment has been modified to include more detailed information about the ticket status. The investigation is ongoing and we expect to have a resolution by end of day today. Thanks for your patience while we work through this performance issue.",
    "contentJson": "{\"type\":\"doc\",\"content\":[{\"type\":\"paragraph\",\"attrs\":{\"textAlign\":\"left\"},\"content\":[{\"type\":\"text\",\"text\":\"Updated: This comment has been modified to include more detailed information about the ticket status. The investigation is ongoing and we expect to have a resolution by end of day today. Thanks for your patience while we work through this performance issue.\"}]}]}",
    "isEdited": true,
    "threadName": null,
    "commentVisibility": "public",
    "commentType": "comment",
    "isPinned": false,
    "sourceEmailId": null,
    "metadata": {
      "mentions": [],
      "lastEditedAt": "2025-07-25T12:54:43.379Z",
      "lastEditedBy": "8"
    },
    "createdAt": "2025-07-25T12:40:33.539Z",
    "updatedAt": "2025-07-25T12:54:42.597Z",
    "author": "shakthi+1",
    "authorAvatarUrl": null,
    "attachments": [],
    "authorId": "UTH00SEXXFNVVN",
    "authorUserType": "ORG_ADMIN",
    "impersonatedUserEmail": null,
    "impersonatedUserName": null,
    "impersonatedUserAvatar": null,
    "deletedAt": null
  },
  "status": true,
  "message": "Comment updated successfully!",
  "timestamp": "2025-07-25T12:54:43.666Z"
}
```

<Admonition type="tip">
  Always pass an object as input, even if empty, to avoid errors when calling the tool directly.
</Admonition>

***
