search_tickets
Search Request Tracker tickets using TicketSQL queries, applying filters for queue, status, owner, subject, and custom fields to locate specific issues.
Instructions
Search for tickets using RT's TicketSQL query language. TicketSQL has non-obvious syntax — consult get_ticketsql_grammar before writing any query involving Status, date conditions, custom fields, or special values. Key syntax notes: Status has meta-values Active and Inactive that match all active/inactive statuses across lifecycles (e.g. Status = 'Active' rather than Status = 'open'). Basic examples: "Queue = 'General' AND Owner = 'Nobody'", "Subject LIKE 'login'". A useful default field set is sent automatically, with Queue and Owner expanded to names, so pass fields or subfields only when the context calls for a different set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default 1) | |
| order | No | Sort direction | |
| query | Yes | TicketSQL query string | |
| fields | No | Comma-separated fields to include. Replaces the default (Subject,Status,Queue,Owner,Requestor,Priority,LastUpdated,Due) rather than adding to it. | |
| orderby | No | Field to sort by (e.g. Created, Priority, id) | |
| per_page | No | Results per page (max 100, default 20) | |
| subfields | No | Expand object fields inline, e.g. {"Queue": "Name", "Owner": "Name,EmailAddress"}. Replaces the default ({"Queue":"Name","Owner":"Name"}), so list every field you want expanded. |