MCP Tool: search_tickets

Searches for tickets using Thena’s powerful search API with advanced filtering capabilities. This tool allows you to find tickets based on various criteria including title, description, status, priority, assigned agent, and other ticket properties.

Example Prompt

Search for tickets with "test" in their title

Response Fields

The response will contain a result object with the following structure:
FieldTypeDescription
foundnumberTotal number of tickets found
hitsarrayArray of ticket objects matching the search criteria
pagenumberCurrent page number
facet_countsarrayFacet counts for search results
request_paramsobjectParameters used for the search request
search_cutoffbooleanWhether the search was cut off due to limits

Ticket Object Fields

Each ticket in the hits array contains a document object with the following fields:
FieldTypeDescription
idstringTicket ID
uidstringTicket unique identifier
ticketIdstringTicket number
ticketIdentifierstringFull ticket identifier (e.g., “WED-5”)
titlestringTicket title
descriptionstringTicket description
aiGeneratedSummarystringAI-generated summary
aiGeneratedTitlestringAI-generated title
metadatastringTicket metadata (JSON string)
ticketRelationshipsAsSourcearrayTicket relationships where this ticket is the source
ticketRelationshipsAsTargetarrayTicket relationships where this ticket is the target
organizationIdnumberOrganization ID
organizationUidstringOrganization unique identifier
formIdnumberForm ID
formUidstringForm unique identifier
formNamestringForm name
formCreatedAtstring (ISO8601)Form creation timestamp
formUpdatedAtstring (ISO8601)Form last update timestamp
formCreatedBynumberForm creator ID
formOrdernumberForm order
formTeamIdnumberForm team ID
formTypestringForm type
formDefaultbooleanWhether this is the default form
requestorEmailstringRequestor email
submitterEmailstringSubmitter email
accountIdstringAccount ID
accountNamestringAccount name
lastCustomerCommentstringLast customer comment
lastVendorCommentstringLast vendor comment
teamIdnumberTeam ID
teamUidstringTeam unique identifier
teamIdentifierstringTeam identifier
teamNamestringTeam name
teamIconstringTeam icon
teamColorstringTeam color
teamOrganizationIdnumberTeam organization ID
teamParentTeamIdnumberTeam parent team ID
teamDescriptionstringTeam description
teamConfigurationIdnumberTeam configuration ID
teamTeamOwnerIdnumberTeam owner ID
teamIsActivebooleanWhether the team is active
teamIsPrivatebooleanWhether the team is private
teamCreatedAtstring (ISO8601)Team creation timestamp
teamUpdatedAtstring (ISO8601)Team last update timestamp
subTeamIdstringSub-team ID
subTeamUidstringSub-team unique identifier
subTeamNamestringSub-team name
subTeamIdentifierstringSub-team identifier
subTeamIconstringSub-team icon
subTeamColorstringSub-team color
subTeamOrganizationIdnumberSub-team organization ID
subTeamParentTeamIdnumberSub-team parent team ID
subTeamDescriptionstringSub-team description
subTeamConfigurationIdnumberSub-team configuration ID
subTeamTeamOwnerIdnumberSub-team owner ID
subTeamIsActivebooleanWhether the sub-team is active
subTeamIsPrivatebooleanWhether the sub-team is private
subTeamCreatedAtstring (ISO8601)Sub-team creation timestamp
subTeamUpdatedAtstring (ISO8601)Sub-team last update timestamp
assignedAgentIdnumberAssigned agent ID
assignedAgentEmailstringAssigned agent email
assignedAgentNamestringAssigned agent name
assignedAgentUidstringAssigned agent unique identifier
assignedAgentAvatarUrlstringAssigned agent avatar URL
statusIdnumberStatus ID
statusNamestringStatus name
statusUidstringStatus unique identifier
priorityIdnumberPriority ID
priorityNamestringPriority name
priorityUidstringPriority unique identifier
typeIdnumberType ID
typeNamestringType name
typeUidstringType unique identifier
typeIconstringType icon
typeColorstringType color
customerContactUidstringCustomer contact unique identifier
customerContactNamestringCustomer contact name
customerContactEmailstringCustomer contact email
isEscalatedbooleanWhether the ticket is escalated
isPrivatebooleanWhether the ticket is private
isDraftbooleanWhether the ticket is a draft
sentimentIdnumberSentiment ID
sentimentUidstringSentiment unique identifier
sentimentNamestringSentiment name
sourcestringTicket source
storyPointsnumberStory points
createdAtstring (ISO8601)Ticket creation timestamp
updatedAtstring (ISO8601)Ticket last update timestamp
slaTotalResolutionTimeComplianceStatestringSLA total resolution time compliance state
slaFirstTimeResponseCreatedAtstringSLA first time response created at
slaFirstTimeResponseScheduledAtstringSLA first time response scheduled at
slaFirstTimeResponseBreachedAtstringSLA first time response breached at
slaFirstTimeResponseAchievedAtstringSLA first time response achieved at
slaFirstTimeResponsePausedAtstringSLA first time response paused at
slaFirstTimeResponseResumedAtstringSLA first time response resumed at
slaFirstTimeResponseCancelledAtstringSLA first time response cancelled at
slaFirstTimeResponseNextAttemptAtstringSLA first time response next attempt at
slaFirstTimeResponseComplianceStatestringSLA first time response compliance state
slaNextTimeResponseCreatedAtstringSLA next time response created at
slaNextTimeResponseScheduledAtstringSLA next time response scheduled at
slaNextTimeResponseBreachedAtstringSLA next time response breached at
slaNextTimeResponseAchievedAtstringSLA next time response achieved at
slaNextTimeResponsePausedAtstringSLA next time response paused at
slaNextTimeResponseCancelledAtstringSLA next time response cancelled at
slaNextTimeResponseDurationToBreachMinutesstringSLA next time response duration to breach minutes
slaNextTimeResponsePausedDurationMinutesstringSLA next time response paused duration minutes
slaNextTimeResponseNextAttemptAtstringSLA next time response next attempt at
slaNextTimeResponseComplianceStatestringSLA next time response compliance state
slaUpdateTimeCreatedAtstringSLA update time created at
slaUpdateTimeScheduledAtstringSLA update time scheduled at
slaUpdateTimeBreachedAtstringSLA update time breached at
slaUpdateTimeAchievedAtstringSLA update time achieved at
slaUpdateTimePausedAtstringSLA update time paused at
slaUpdateTimeResumedAtstringSLA update time resumed at
slaUpdateTimeCancelledAtstringSLA update time cancelled at
slaUpdateTimeDurationToBreachMinutesstringSLA update time duration to breach minutes
slaUpdateTimePausedDurationMinutesstringSLA update time paused duration minutes
slaUpdateTimeNextAttemptAtstringSLA update time next attempt at
slaUpdateComplianceStatestringSLA update compliance state
accountPrimaryDomainstringAccount primary domain
accountWebsitestringAccount website
accountSecondaryDomainstringAccount secondary domain
accountBillingAddressstringAccount billing address
accountShippingAddressstringAccount shipping address
accountAnnualRevenuestringAccount annual revenue
accountEmployeesstringAccount employees
accountOwnerIdstringAccount owner ID
accountOwnerEmailstringAccount owner email
accountOwnerNamestringAccount owner name
accountOwnerUserTypestringAccount owner user type
accountOwnerStatusstringAccount owner status
accountOwnerTimezonestringAccount owner timezone
accountIsActivebooleanWhether the account is active
accountSourcestringAccount source
accountHealthstringAccount health
accountIndustrystringAccount industry
accountClassificationstringAccount classification
accountStatusstringAccount status
accountUidstringAccount unique identifier
accountLogostringAccount logo
accountOwnerUidstringAccount owner unique identifier
accountHealthUidstringAccount health unique identifier
accountIndustryUidstringAccount industry unique identifier
accountClassificationUidstringAccount classification unique identifier
accountStatusUidstringAccount status unique identifier
accountHealthValuestringAccount health value
accountIndustryValuestringAccount industry value
accountClassificationValuestringAccount classification value
accountStatusValuestringAccount status value
contactEmailstringContact email
contactNamestringContact name
contactAvatarUrlstringContact avatar URL
contactPhonestringContact phone
accountCustomFieldsarrayAccount custom fields
ticketCustomFieldValuesarrayTicket custom field values
tagsobjectTicket tags
csatRatingValuenumberCSAT rating value
csatCommentTextstringCSAT comment text
csatCompletedAtstringCSAT completed at
csatMappingStatusstringCSAT mapping status
csatSamplingStatusstringCSAT sampling status
csatFeedbackTypestringCSAT feedback type
csatSurveyConfigRatingScalenumberCSAT survey config rating scale
csatDeliveryDetailsRecipientstringCSAT delivery details recipient
csatDeliveryDetailsLastAttemptAtstringCSAT delivery details last attempt at
csatDeliveryDetailsDeliveryAttemptsnumberCSAT delivery details delivery attempts
parentStatusUidstringParent status unique identifier
parentStatusNamestringParent status name

Sample Response

{
  "result": {
    "facet_counts": [],
    "found": 58,
    "hits": [
      {
        "document": {
          "id": "11",
          "uid": "4SSQPQZJ10QQV6PX91B2GN9G302R3",
          "ticketId": "5",
          "ticketIdentifier": "WED-5",
          "title": "test",
          "description": "",
          "aiGeneratedSummary": "",
          "aiGeneratedTitle": "",
          "metadata": "{\"source\":\"manual\"}",
          "ticketRelationshipsAsSource": [],
          "ticketRelationshipsAsTarget": [],
          "organizationId": 4,
          "organizationUid": "ETHPPX4JJ21NNJ",
          "formId": 13,
          "formUid": "FODDKPKKXW88L",
          "formName": "Default team form",
          "formCreatedAt": "2025-07-09T09:17:15.839Z",
          "formUpdatedAt": "2025-07-09T09:17:15.839Z",
          "formCreatedBy": 0,
          "formOrder": 0,
          "formTeamId": 5,
          "formType": "ticket_creation",
          "formDefault": true,
          "requestorEmail": "shakthi@thena.ai",
          "submitterEmail": "shakthi+1@thena.ai",
          "accountId": "1",
          "accountName": "Thena",
          "lastCustomerComment": "",
          "lastVendorComment": "",
          "teamId": 5,
          "teamUid": "THETT4QZZD9PPM",
          "teamIdentifier": "WED",
          "teamName": "wed",
          "teamIcon": "",
          "teamColor": "rgb(155, 135, 245)",
          "teamOrganizationId": 4,
          "teamParentTeamId": 0,
          "teamDescription": "",
          "teamConfigurationId": 3,
          "teamTeamOwnerId": 8,
          "teamIsActive": true,
          "teamIsPrivate": false,
          "teamCreatedAt": "2025-07-09T09:17:14.954Z",
          "teamUpdatedAt": "2025-07-09T09:17:14.954Z",
          "subTeamId": "5",
          "subTeamUid": "THETT4QZZD9PPM",
          "subTeamName": "wed",
          "subTeamIdentifier": "WED",
          "subTeamIcon": "",
          "subTeamColor": "rgb(155, 135, 245)",
          "subTeamOrganizationId": 4,
          "subTeamParentTeamId": 0,
          "subTeamDescription": "",
          "subTeamConfigurationId": 3,
          "subTeamTeamOwnerId": 8,
          "subTeamIsActive": true,
          "subTeamIsPrivate": false,
          "subTeamCreatedAt": "2025-07-09T09:17:14.954Z",
          "subTeamUpdatedAt": "2025-07-09T09:17:14.954Z",
          "assignedAgentId": 0,
          "assignedAgentEmail": "",
          "assignedAgentName": "",
          "assignedAgentUid": "null",
          "assignedAgentAvatarUrl": "",
          "statusId": 9,
          "statusName": "Open",
          "statusUid": "YM5K7QZJ10NPP6GZXZTR1C2DB9AG3",
          "priorityId": 10,
          "priorityName": "Medium",
          "priorityUid": "GR5K7QZJ10H0300NBSAPN5CG4TN9F",
          "typeId": 0,
          "typeName": "",
          "typeUid": "",
          "typeIcon": "",
          "typeColor": "",
          "customerContactUid": "FCR9DQZJ10VX8C6R7BXYP99R52K9B",
          "customerContactName": "Shakthi",
          "customerContactEmail": "shakthi@thena.ai",
          "isEscalated": false,
          "isPrivate": false,
          "isDraft": false,
          "sentimentId": 9,
          "sentimentUid": "JT5K7QZJ107BR5DAKC2HBC4G3NA5A",
          "sentimentName": "Neutral",
          "source": "manual",
          "storyPoints": 0,
          "createdAt": "2025-07-09T13:41:55.611Z",
          "updatedAt": "2025-07-09T13:41:55.611Z",
          "slaTotalResolutionTimeComplianceState": "NOT_SCHEDULED",
          "slaFirstTimeResponseCreatedAt": "",
          "slaFirstTimeResponseScheduledAt": "",
          "slaFirstTimeResponseBreachedAt": "",
          "slaFirstTimeResponseAchievedAt": "",
          "slaFirstTimeResponsePausedAt": "",
          "slaFirstTimeResponseResumedAt": "",
          "slaFirstTimeResponseCancelledAt": "",
          "slaFirstTimeResponseNextAttemptAt": "",
          "slaFirstTimeResponseComplianceState": "NOT_SCHEDULED",
          "slaNextTimeResponseCreatedAt": "",
          "slaNextTimeResponseScheduledAt": "",
          "slaNextTimeResponseBreachedAt": "",
          "slaNextTimeResponseAchievedAt": "",
          "slaNextTimeResponsePausedAt": "",
          "slaNextTimeResponseCancelledAt": "",
          "slaNextTimeResponseDurationToBreachMinutes": "",
          "slaNextTimeResponsePausedDurationMinutes": "",
          "slaNextTimeResponseNextAttemptAt": "",
          "slaNextTimeResponseComplianceState": "NOT_SCHEDULED",
          "slaUpdateTimeCreatedAt": "",
          "slaUpdateTimeScheduledAt": "",
          "slaUpdateTimeBreachedAt": "",
          "slaUpdateTimeAchievedAt": "",
          "slaUpdateTimePausedAt": "",
          "slaUpdateTimeResumedAt": "",
          "slaUpdateTimeCancelledAt": "",
          "slaUpdateTimeDurationToBreachMinutes": "",
          "slaUpdateTimePausedDurationMinutes": "",
          "slaUpdateTimeNextAttemptAt": "",
          "slaUpdateComplianceState": "NOT_SCHEDULED",
          "accountPrimaryDomain": "thena.ai",
          "accountWebsite": "",
          "accountSecondaryDomain": "",
          "accountBillingAddress": "",
          "accountShippingAddress": "",
          "accountAnnualRevenue": "",
          "accountEmployees": "",
          "accountOwnerId": "",
          "accountOwnerEmail": "",
          "accountOwnerName": "",
          "accountOwnerUserType": "",
          "accountOwnerStatus": "",
          "accountOwnerTimezone": "",
          "accountIsActive": true,
          "accountSource": "Thena",
          "accountHealth": "",
          "accountIndustry": "",
          "accountClassification": "",
          "accountStatus": "124",
          "accountUid": "87R9DQZJ10F1EM01E42C0JN9B1AC0",
          "accountLogo": "",
          "accountOwnerUid": "",
          "accountHealthUid": "",
          "accountIndustryUid": "",
          "accountClassificationUid": "",
          "accountStatusUid": "8GKAK7ZJ10DW6X9HATH2QYG2KX9KY",
          "accountHealthValue": "",
          "accountIndustryValue": "",
          "accountClassificationValue": "",
          "accountStatusValue": "Prospect",
          "contactEmail": "shakthi@thena.ai",
          "contactName": "Shakthi",
          "contactAvatarUrl": "",
          "contactPhone": "",
          "accountCustomFields": [],
          "ticketCustomFieldValues": [],
          "tags": {
            "values": []
          },
          "csatRatingValue": 0,
          "csatCommentText": "",
          "csatCompletedAt": null,
          "csatMappingStatus": "processed",
          "csatSamplingStatus": "selected",
          "csatFeedbackType": "thumbs",
          "csatSurveyConfigRatingScale": 0,
          "csatDeliveryDetailsRecipient": null,
          "csatDeliveryDetailsLastAttemptAt": null,
          "csatDeliveryDetailsDeliveryAttempts": 0,
          "parentStatusUid": "",
          "parentStatusName": ""
        }
      }
    ],
    "page": 1,
    "request_params": {
      "search_mode": "fallback",
      "q": "*",
      "query_by": "*",
      "filter_by": "title:=test",
      "collection": "tickets"
    },
    "search_cutoff": false
  }
}