Skip to main content
Glama

list_tickets

Read-onlyIdempotent

Retrieve support tickets from ITSM systems with optional filters by status, assignee, or platform.

Instructions

List tickets with optional filtering by status, assignee, or system

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by status
assigned_toNoFilter by assignee username
limitNoMax number of tickets to return
systemNoITSM system to usejira

Implementation Reference

  • Business logic handler that filters tickets by status, assignee, and system, sorts by created_at descending, limits results, and returns a mapped subset of ticket fields.
    function listTickets({ status, assigned_to, limit = 10, system } = {}) {
      let list = Array.from(tickets.values());
      if (status && status !== 'all') list = list.filter(t => t.status === status);
      if (assigned_to) list = list.filter(t => t.assignee === assigned_to);
      if (system) list = list.filter(t => t.system === system);
      list.sort((a, b) => new Date(b.created_at) - new Date(a.created_at));
      list = list.slice(0, limit);
      return { success: true, tickets: list.map(t => ({ id: t.id, title: t.title, status: t.status, priority: t.priority, system: t.system, created_at: t.created_at })), total: list.length };
    }
  • index.js:247-267 (registration)
    MCP tool registration for 'list_tickets' with Zod schema for input validation and annotations for readOnly/idempotent hints.
    server.tool(
      'list_tickets',
      'List tickets with optional filtering by status, assignee, or system',
      {
        status: z.enum(['open', 'in_progress', 'resolved', 'closed', 'all']).optional().describe('Filter by status'),
        assigned_to: z.string().optional().describe('Filter by assignee username'),
        limit: z.number().int().min(1).max(100).default(10).describe('Max number of tickets to return'),
        system: systemSchema.optional(),
      },
      {
        title: 'List Tickets',
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: false,
      },
      async ({ status, assigned_to, limit, system }) => {
        const result = listTickets({ status, assigned_to, limit, system });
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
      },
    );
  • Reusable Zod schema for the 'system' parameter used by list_tickets and other tools.
    const systemSchema = z
      .enum(['servicenow', 'jira', 'zendesk', 'ivanti_neurons', 'cherwell'])
      .default('jira')
      .describe('ITSM system to use');
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and idempotentHint=true. The description adds no new behavioral details (e.g., pagination, sorting, API limits) beyond what the schema and annotations imply, so it provides moderate added value.

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?

A single 10-word sentence that efficiently conveys the tool's purpose and key filters. No extraneous information, and the core action is front-loaded.

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

Completeness3/5

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

Given the tool's simplicity (list operation with 4 optional parameters, no output schema), the description covers the basics but omits usage guidelines and details about return format or pagination, leaving some gaps for an agent to infer.

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?

Schema description coverage is 100%, meaning all parameters are documented in the schema. The description merely restates the filter options without adding new semantic context, meeting the baseline but not exceeding it.

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 explicitly states 'list tickets' with optional filters by status, assignee, or system, providing a specific verb and resource that clearly differentiates from sibling tools which involve creation or modification.

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?

No guidance on when to use this tool versus alternatives like search_knowledge_base, nor any mention of prerequisites or exclusions. The description only lists optional filters without context on when each is appropriate.

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/madosh/MCP-ITSM'

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