Skip to main content
Glama

ticket_list

List project tickets with status and priority. Filter by project or status to view ticket IDs, then retrieve details with ticket_get.

Instructions

PROJECT MANAGEMENT: List ticket IDs with status/priority. Returns id, status, priority only - use ticket_get for details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoFilter by project ID (case-insensitive)
statusNoFilter by status
limitNoMax tickets to return (default: 50, max: 200)
offsetNoSkip first N tickets for pagination (default: 0)

Implementation Reference

  • Main handler for ticket_list tool: filters tickets by project_id and status, applies pagination (limit/offset), extracts id/status/priority, returns paginated JSON.
    if name == "ticket_list": status = TicketStatus(args["status"]) if args.get("status") else None tickets = db.list_tickets(args.get("project_id"), status) # Apply pagination (default 50, max 200) - items are small now limit = min(args.get("limit", 50), 200) offset = args.get("offset", 0) total = len(tickets) tickets = tickets[offset:offset + limit] # Return IDs + essential metadata only - use ticket_get for details result = [ { "id": t.id, "status": t.status.value, "priority": t.priority.value, } for t in tickets ] return _json({"tickets": result, "offset": offset, "limit": limit, "total": total})
  • Input schema defining parameters for ticket_list: project_id (string), status (enum), limit/offset (integers with defaults).
    inputSchema={ "type": "object", "properties": { "project_id": {"type": "string", "description": "Filter by project ID (case-insensitive)"}, "status": { "type": "string", "enum": ["backlog", "planned", "in-progress", "done", "blocked"], "description": "Filter by status", }, "limit": { "type": "integer", "description": "Max tickets to return (default: 50, max: 200)", "default": 50, }, "offset": { "type": "integer", "description": "Skip first N tickets for pagination (default: 0)", "default": 0, }, },
  • Registers the ticket_list tool with the MCP server including name, description, and input schema.
    Tool( name="ticket_list", description="PROJECT MANAGEMENT: List ticket IDs with status/priority. Returns id, status, priority only - use ticket_get for details.", inputSchema={ "type": "object", "properties": { "project_id": {"type": "string", "description": "Filter by project ID (case-insensitive)"}, "status": { "type": "string", "enum": ["backlog", "planned", "in-progress", "done", "blocked"], "description": "Filter by status", }, "limit": { "type": "integer", "description": "Max tickets to return (default: 50, max: 200)", "default": 50, }, "offset": { "type": "integer", "description": "Skip first N tickets for pagination (default: 0)", "default": 0, }, }, }, ),
  • Database helper method list_tickets that executes SQL query to fetch tickets filtered by project_id (case-insensitive) and status, ordered by priority then created_at, maps rows to Ticket models.
    def list_tickets( self, project_id: str | None = None, status: TicketStatus | None = None ) -> list[Ticket]: query = "SELECT * FROM tickets WHERE 1=1" params = [] if project_id: project_id = self._normalize_id(project_id) query += " AND LOWER(project_id) = ?" params.append(project_id) if status: query += " AND status = ?" params.append(status.value) query += " ORDER BY priority, created_at" rows = self.conn.execute(query, params).fetchall() return [self._row_to_ticket(r) for r in rows]

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/urjitbhatia/tpm-mcp'

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