MCP tool: create_comment
Add a new comment to any entity in the Thena platform. This tool allows you to create comments with various content types, visibility settings, and threading capabilities.
Example prompt
Input parameters
| Name | Type | Required | Description |
|---|---|---|---|
| entityType | string | Yes | The type of entity to comment on (e.g., “ticket”, “accountActivity”, “note”, “task”) |
| entityId | string | Yes | The ID of the entity to comment on |
| content | string | No | The plain text content of the comment |
| contentHtml | string | No | The HTML content of the comment |
| contentJson | string | No | The JSON content of the comment (for rich text editors, etc.) |
| parentCommentId | string | No | The ID of the parent comment (for threaded comments) |
| commentVisibility | enum | No | ”public” or “private” (default: “public”) |
| commentType | string | No | ”note”, “reply”, “comment”, etc. (default: “comment”) |
| threadName | string | No | The name of the comment thread (for grouping) |
| metadata | object | No | Any additional metadata (e.g., mentions, tags) |
| attachmentIds | string[] | No | Array of attachment IDs to associate with the comment |
| customerEmail | string | No | The email of the customer (if commenting as a customer) |
| impersonatedUserEmail | string | No | If impersonating a user, their email |
| impersonatedUserName | string | No | If impersonating a user, their name |
| impersonatedUserAvatar | string | No | If impersonating a user, their avatar URL |
Content types
You can provide comment content in multiple formats:Plain text
HTML content
JSON content (Rich text)
Visibility settings
Public comment (Default)
Private comment
Threaded comments
Create a reply to an existing comment:Comment types
Different comment types serve different purposes:comment- General comment (default)note- Internal notereply- Reply to another commentstatus_update- Status change notificationassignment- Assignment notification
Examples
Basic ticket comment
Public customer response
Comment with attachments
Impersonated user comment
Response fields
Below are the fields you may see in the response:| Field | Type | Description |
|---|---|---|
| id | string | Comment unique ID |
| content | string | Plain text content of the comment |
| contentHtml | string | HTML formatted content |
| contentMarkdown | string | Markdown formatted content |
| contentJson | string | JSON formatted content for rich text |
| isEdited | boolean | Whether the comment has been edited |
| threadName | string | Name of the comment thread |
| commentVisibility | string | Visibility setting (public or private) |
| commentType | string | Type of comment (note, reply, comment, etc.) |
| isPinned | boolean | Whether the comment is pinned |
| sourceEmailId | string | Email ID if comment came from email |
| metadata | object | Additional metadata including mentions |
| createdAt | string (ISO8601) | Creation timestamp |
| updatedAt | string (ISO8601) | Last update timestamp |
| author | string | Author display name |
| authorAvatarUrl | string | Author’s avatar URL |
| attachments | array | Array of attachment IDs |
| authorId | string | Author’s user ID |
| authorUserType | string | Author’s user type (e.g., ORG_ADMIN) |
| impersonatedUserEmail | string | Email of impersonated user |
| impersonatedUserName | string | Name of impersonated user |
| impersonatedUserAvatar | string | Avatar of impersonated user |
| deletedAt | string | Deletion timestamp (null if not deleted) |
Sample response
Error handling
Common error scenarios:- Invalid entity type or ID
- Missing required content
- Invalid attachment IDs
- Permission denied for the entity
- Network or authentication errors