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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ticket_id": "<ticket_id>"
},
"name": "ticket_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | Yes | Ticket ID (e.g., FEAT-001) | |
| detail | No | OMIT this param for most requests (defaults to 'summary'). Only use 'full' if user explicitly asks for all details/metadata. | summary |
Implementation Reference
- src/tpm_mcp/server.py:595-650 (handler)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 ], } ) - src/tpm_mcp/server.py:256-274 (registration)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"], }, ), - src/tpm_mcp/server.py:261-273 (schema)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"], },