list_tickets
Retrieve and manage tickets in mcptix with filtering, sorting, and pagination options to streamline project task tracking and organization.
Instructions
List tickets with optional filtering, sorting, and pagination
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of tickets to return | |
| offset | No | Number of tickets to skip | |
| order | No | Sort order | desc |
| priority | No | Filter by priority | |
| search | No | Search term for title and description | |
| sort | No | Sort field | updated |
| status | No | Filter by status |
Implementation Reference
- The handler function that implements the list_tickets tool logic. It processes input arguments to filter, sort, and paginate tickets using the TicketQueries database interface.export function handleListTickets(ticketQueries: TicketQueries, args: any): ToolResponse { Logger.debug('McpServer', `handleListTickets called with args: ${JSON.stringify(args)}`); const filters = { status: args.status, priority: args.priority, search: args.search, }; Logger.debug('McpServer', `Using filters: ${JSON.stringify(filters)}`); const tickets = ticketQueries.getTickets( filters, args.sort || 'updated', args.order || 'desc', args.limit || 100, args.offset || 0, ); return createSuccessResponse(tickets); }
- src/mcp/tools/schemas.ts:4-46 (schema)The input schema definition for the list_tickets tool, specifying parameters for filtering by status/priority/search, sorting, and pagination.name: 'list_tickets', description: 'List tickets with optional filtering, sorting, and pagination', inputSchema: { type: 'object', properties: { 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'], }, search: { type: 'string', description: 'Search term for title and description', }, sort: { type: 'string', description: 'Sort field', default: 'updated', }, 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, }, }, }, },
- src/mcp/tools/setup.ts:38-40 (registration)Registration of the list_tickets handler in the MCP tool call switch statement within the setupToolHandlers function.case 'list_tickets': return handleListTickets(ticketQueries, args); case 'get_ticket':