Skip to main content
Glama

search_tickets

Search Request Tracker tickets using TicketSQL to filter by owner, date, queue, or status. Get matching ticket summaries with sorting and pagination.

Instructions

Search for tickets using RT's TicketSQL query language. Returns summary information for matching tickets, with optional sorting and pagination.

The query is TicketSQL (NOT free-text keyword search). Examples:

  • My last 10 tickets: query="Owner = 'CurrentUser'", orderby="Created", order="DESC", per_page=10

  • Last 10 tickets created: query="id > 0", orderby="id", order="DESC", per_page=10

  • Created after a date: query="Created > '2026-06-01'"

  • By requestor: query="Requestor = 'jsmith'" (also Cc, AdminCc, Watcher, Owner)

  • ID range: query="id > 261000 AND id < 261700"

  • Combined: query="Queue = 'Support' AND Status = 'open' AND LastUpdated > '7 days ago'"

Call the get_ticketsql_grammar tool for the full TicketSQL field/operator reference.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number to fetch (default 1).
orderNoSort direction. Defaults to DESC when orderby is set (newest/highest first).
queryYesTicketSQL query string (e.g., "Created > '2026-06-01' AND Owner = 'jsmith'"). Use "id > 0" to match all tickets.
fieldsNoComma-separated list of extra ticket fields to include (e.g., "Priority,Requestor").
orderbyNoField to sort results by.
per_pageNoResults per page (default 20, max 100).
subfieldsNoExpand nested object fields inline, e.g. {"Owner":"Name,EmailAddress","Queue":"Name"}.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates that results are summary information, not full ticket details, and that special TicketSQL syntax like '__CurrentUser__' and relative date expressions are supported. It does not mention permissions, rate limits, or response structure, but for a search tool it provides meaningful context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear purpose statement, a critical usage warning, illustrative examples, and a pointer to the grammar tool. The examples are numerous but each serves a distinct use case, and there is no filler. It is longer than minimal, but the length is justified by the complexity of TicketSQL.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex TicketSQL-based search tool with no output schema, the description covers the query language, sorting, pagination, and the not-free-text constraint, and links to the full grammar reference. The main gap is that it does not specify exactly which fields are included in the 'summary information' results, leaving the return format somewhat under-specified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description significantly enhances the query parameter by providing multiple TicketSQL examples that illustrate syntax, operators, and field names. It also clarifies through examples how orderby, order, and per_page interact, adding value beyond the raw schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for tickets using RT's TicketSQL query language and returns summary information with sorting and pagination. This specific verb+resource+mechanism combination distinguishes it from sibling tools like get_ticket, which fetches individual ticket details, and get_ticketsql_grammar, which only provides grammar reference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly warns that the query is TicketSQL and NOT free-text keyword search, and provides multiple concrete examples covering common use cases. It also directs users to get_ticketsql_grammar for the full grammar reference. However, it doesn't explicitly state when to prefer this tool over get_ticket or get_ticket_correspondence for retrieving detailed ticket data.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/msekoranja/rt-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server