MCP tool: search_comments
Searches for comments using Thena’s powerful search API with advanced filtering capabilities. This tool allows you to find comments based on various criteria including content, ticket UID, author, comment type, visibility, and other comment properties.
Example prompt
Response fields
The response will contain aresult
object with the following structure:
Field | Type | Description |
---|---|---|
found | number | Total number of comments found |
hits | array | Array of comment objects matching the search criteria |
page | number | Current page number |
facet_counts | array | Facet counts for search results |
request_params | object | Parameters used for the search request |
search_cutoff | boolean | Whether the search was cut off due to limits |
Comment object fields
Each comment in thehits
array contains a document
object with the following fields:
Field | Type | Description |
---|---|---|
id | string | Comment unique identifier |
content | string | Comment content (main text) |
contentHtml | string | HTML formatted content |
contentMarkdown | string | Markdown formatted content |
contentJson | string | JSON representation of content |
isEdited | boolean | Whether the comment was edited |
threadName | string | Comment thread name |
commentVisibility | string | Comment visibility (public, private) |
commentType | string | Type of comment (comment, reply, note) |
isPinned | boolean | Whether the comment is pinned |
sourceEmailId | string | Source email ID |
metadata | object | Comment metadata (mentions, userReactions, etc.) |
createdAt | string (ISO8601) | Comment creation timestamp |
updatedAt | string (ISO8601) | Last update timestamp |
author | string | Author name |
authorAvatarUrl | string | Author avatar URL |
attachments | array | Comment attachments |
authorId | string | Author’s user ID |
authorUserType | string | Author’s user type |
impersonatedUserEmail | string | Impersonated user email |
impersonatedUserName | string | Impersonated user name |
impersonatedUserAvatar | string | Impersonated user avatar |
deletedAt | string (ISO8601) | Deletion timestamp (if applicable) |
Metadata object fields
Themetadata
object may contain:
Field | Type | Description |
---|---|---|
mentions | array | List of mentioned users |
userReactions | array | User reactions to the comment |
replies | array | List of reply comment IDs |
lastEditedAt | string (ISO8601) | Last edit timestamp |
lastEditedBy | string | User who last edited the comment |
Sample response
Notes
- Only authorized users can access this tool; results are scoped to the user’s organization.
- The search API supports full-text search on comment content, markdown, and HTML using ILike pattern matching.
- Comment UID searches require exact matches.
- Filters can be combined using AND or OR logic for complex queries.
- Date filters should use ISO 8601 format (e.g., “2025-07-25T12:16:24.755Z”).
- Boolean filters use true/false values.
- The search is case-insensitive for text fields.
- Results are paginated with a maximum of 250 items per page.
- Use the
range
operator for date ranges (e.g., “[2025-07-01..2025-07-31]”). - Related data (metadata, attachments, etc.) is included in the response but not searchable.