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]
Behavior3/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 mentions the return format ('Returns id, status, priority only') which is valuable, but doesn't address important behavioral aspects like pagination behavior (implied by offset parameter), rate limits, authentication requirements, or error conditions. The description adds some context but leaves significant gaps.

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 extremely concise (two sentences) with zero wasted words. The first sentence establishes purpose and scope, the second provides crucial usage guidance. Every element earns its place and the information is front-loaded appropriately.

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?

For a list tool with 4 parameters, 100% schema coverage, but no annotations and no output schema, the description provides adequate but incomplete context. It covers purpose and sibling differentiation well, but lacks behavioral details about pagination, rate limits, or error handling that would be helpful given the absence of annotations.

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%, so the schema already fully documents all 4 parameters. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions filtering by 'status/priority' but priority isn't actually a parameter in the schema. Baseline 3 is appropriate when the schema does all the work.

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's purpose with specific verb ('List') and resource ('ticket IDs'), and distinguishes it from sibling tools by mentioning 'use ticket_get for details'. It explicitly lists what fields are returned (id, status, priority only), making the scope unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool versus alternatives: 'use ticket_get for details' indicates this is for summary-level information, while ticket_get is for detailed views. This directly addresses sibling tool differentiation without needing to mention all alternatives.

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

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