Skip to main content
Glama

search_tickets

Search for tickets in mcptix using criteria like status, priority, and keywords. Retrieve sorted results with customizable limits and offsets for efficient ticket management.

Instructions

Search for tickets based on various criteria

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of tickets to return
offsetNoNumber of tickets to skip
orderNoSort orderdesc
priorityNoFilter by priority
queryYesSearch query
sortNoSort fieldrelevance
statusNoFilter by status

Implementation Reference

  • The main handler function that executes the search_tickets tool logic, validating input, building filters, querying tickets, and returning results.
    export function handleSearchTickets(ticketQueries: TicketQueries, args: any): ToolResponse {
      if (!args.query) {
        throw new Error('Search query is required');
      }
    
      const filters = {
        status: args.status,
        priority: args.priority,
        search: args.query,
      };
    
      const tickets = ticketQueries.getTickets(
        filters,
        args.sort || 'updated',
        args.order || 'desc',
        args.limit || 100,
        args.offset || 0,
      );
    
      return createSuccessResponse(tickets);
    }
  • The input schema definition for the search_tickets tool, including properties for query, filters, sorting, and pagination with validation rules.
    {
      name: 'search_tickets',
      description: 'Search for tickets based on various criteria',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Search query',
          },
          status: {
            type: 'string',
            description: 'Filter by status',
            enum: ['backlog', 'up-next', 'in-progress', 'in-review', 'completed'],
          },
          priority: {
            type: 'string',
            description: 'Filter by priority',
            enum: ['low', 'medium', 'high'],
          },
          sort: {
            type: 'string',
            description: 'Sort field',
            default: 'relevance',
          },
          order: {
            type: 'string',
            description: 'Sort order',
            enum: ['asc', 'desc'],
            default: 'desc',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of tickets to return',
            default: 100,
          },
          offset: {
            type: 'number',
            description: 'Number of tickets to skip',
            default: 0,
          },
        },
        required: ['query'],
      },
    },
  • The switch case that registers and routes calls to the search_tickets handler function.
    case 'search_tickets':
      return handleSearchTickets(ticketQueries, args);
  • The import statement that brings in the search_tickets handler for use in tool registration.
    import { handleSearchTickets } from './handlers/search-tickets';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'based on various criteria', which hints at filtering, but fails to detail key behaviors such as pagination handling (implied by limit/offset), authentication needs, rate limits, or what the search returns. This leaves significant gaps for a tool with 7 parameters.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It's appropriately sized and front-loaded, directly stating the tool's action without unnecessary elaboration.

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

Completeness2/5

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

For a search tool with 7 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain the return format, error handling, or how search criteria combine, leaving the agent with insufficient context to use the tool effectively beyond basic parameter input.

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

Parameters3/5

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

The description adds minimal meaning beyond the input schema, which has 100% coverage with detailed parameter descriptions. It implies filtering via 'various criteria', but doesn't elaborate on syntax or interactions between parameters. Given the high schema coverage, a baseline score of 3 is appropriate as the schema does most of the work.

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

Purpose4/5

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

The description clearly states the verb ('search') and resource ('tickets'), making the purpose evident. However, it doesn't distinguish this tool from its sibling 'list_tickets', which might also retrieve tickets, leaving room for ambiguity in sibling differentiation.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'list_tickets' or 'get_ticket'. It lacks explicit context, exclusions, or prerequisites, offering minimal usage direction beyond the basic action.

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

Related 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/ownlytics/mcptix'

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