Skip to main content
Glama

ticket_get

Retrieve ticket information and task details from the tpm-mcp project management system. Specify detail level to get summary or comprehensive data about project progress and structure.

Instructions

PROJECT MANAGEMENT: Get info about a ticket and its tasks.

IMPORTANT: Do NOT pass detail='full' unless explicitly asked for full/all details. The default 'summary' is sufficient for most queries. Only use 'full' when user specifically asks for implementation details, metadata, or complete task information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticket_idYesTicket ID (e.g., FEAT-001)
detailNoOMIT this param for most requests (defaults to 'summary'). Only use 'full' if user explicitly asks for all details/metadata.summary

Implementation Reference

  • Handler for the 'ticket_get' tool: retrieves ticket details and associated tasks from the database, formats response based on 'detail' parameter (minimal/summary/full).
    if name == "ticket_get":
        ticket = db.get_ticket(args["ticket_id"])
        if not ticket:
            return f"Ticket {args['ticket_id']} not found"
    
        detail = args.get("detail", "summary")
        tasks = db.list_tasks(args["ticket_id"])
    
        if detail == "minimal":
            # Just the essentials - very small response
            return _json(
                {
                    "ticket": {
                        "id": ticket.id,
                        "title": ticket.title,
                        "status": ticket.status.value,
                        "priority": ticket.priority.value,
                        "task_count": len(tasks),
                        "tasks_done": sum(
                            1 for t in tasks if t.status.value in ("done", "completed")
                        ),
                    }
                }
            )
        elif detail == "full":
            # Everything - can be large
            return _json({"ticket": ticket.model_dump(), "tasks": [t.model_dump() for t in tasks]})
        else:
            # summary (default) - balanced response
            desc = ticket.description
            if desc and len(desc) > 300:
                desc = desc[:300] + "..."
            return _json(
                {
                    "ticket": {
                        "id": ticket.id,
                        "title": ticket.title,
                        "description": desc,
                        "status": ticket.status.value,
                        "priority": ticket.priority.value,
                        "tags": ticket.tags,
                        "assignees": ticket.assignees,
                        "acceptance_criteria": ticket.acceptance_criteria,
                    },
                    "tasks": [
                        {
                            "id": t.id,
                            "title": t.title,
                            "status": t.status.value,
                            "priority": t.priority.value,
                        }
                        for t in tasks
                    ],
                }
            )
  • Registers the 'ticket_get' tool in the MCP server's list_tools() function, defining its name, description, and input schema.
            Tool(
                name="ticket_get",
                description="""PROJECT MANAGEMENT: Get info about a ticket and its tasks.
    
    IMPORTANT: Do NOT pass detail='full' unless explicitly asked for full/all details. The default 'summary' is sufficient for most queries. Only use 'full' when user specifically asks for implementation details, metadata, or complete task information.""",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "ticket_id": {"type": "string", "description": "Ticket ID (e.g., FEAT-001)"},
                        "detail": {
                            "type": "string",
                            "enum": ["minimal", "summary", "full"],
                            "description": "OMIT this param for most requests (defaults to 'summary'). Only use 'full' if user explicitly asks for all details/metadata.",
                            "default": "summary",
                        },
                    },
                    "required": ["ticket_id"],
                },
            ),
  • Input schema for the 'ticket_get' tool, defining parameters: ticket_id (required), detail (optional enum with default 'summary').
    inputSchema={
        "type": "object",
        "properties": {
            "ticket_id": {"type": "string", "description": "Ticket ID (e.g., FEAT-001)"},
            "detail": {
                "type": "string",
                "enum": ["minimal", "summary", "full"],
                "description": "OMIT this param for most requests (defaults to 'summary'). Only use 'full' if user explicitly asks for all details/metadata.",
                "default": "summary",
            },
        },
        "required": ["ticket_id"],
    },
Behavior3/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. It discloses behavioral traits such as the default behavior for the 'detail' parameter and warnings about using 'full' detail. However, it lacks information on permissions, rate limits, or error handling, which are important for a read operation tool.

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 well-structured and front-loaded with the purpose, followed by important usage guidelines. Every sentence earns its place by providing critical information without redundancy, making it efficient and easy to parse.

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

Completeness4/5

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

Given the tool's complexity (simple read operation with 2 parameters), 100% schema coverage, and no output schema, the description is mostly complete. It covers purpose, key parameter semantics, and usage guidelines. However, it could benefit from mentioning the return format or any limitations, slightly reducing completeness.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3. The description adds value by emphasizing the importance of the 'detail' parameter, explaining when to use 'full' vs. default 'summary', and reinforcing the schema's guidance. This goes beyond the schema's enum and default values, providing practical usage context.

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 tool's purpose: 'Get info about a ticket and its tasks.' It specifies the verb ('Get') and resource ('ticket and its tasks'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'ticket_list' or 'ticket_search', which is why it doesn't reach a score of 5.

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 vs. alternatives: it advises to use the default 'summary' detail for most queries and only use 'full' when explicitly asked for all details. This directly addresses usage scenarios and parameter selection, offering clear when-to-use and when-not-to-use instructions.

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