task_list
List and filter project tasks by status or ticket ID to track progress and manage workflows within the TPM-MCP server.
Instructions
PROJECT MANAGEMENT (TPM): List task IDs with status. Returns id, ticket_id, status only - use task_get for details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket_id | No | Filter by ticket ID | |
| status | No | Filter by status | |
| limit | No | Max tasks to return (default: 50, max: 200) | |
| offset | No | Skip first N tasks for pagination (default: 0) |
Implementation Reference
- src/tpm_mcp/server.py:672-689 (handler)Executes the task_list tool: filters tasks by ticket_id and status from the database, applies pagination (limit/offset), and returns JSON with task summaries including id, ticket_id, status, and pagination metadata.if name == "task_list": status = TaskStatus(args["status"]) if args.get("status") else None tasks = db.list_tasks(args.get("ticket_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(tasks) tasks = tasks[offset:offset + limit] # Return IDs + essential metadata only - use task_get for details result = [ { "id": t.id, "ticket_id": t.ticket_id, "status": t.status.value, } for t in tasks ] return _json({"tasks": result, "offset": offset, "limit": limit, "total": total})
- src/tpm_mcp/server.py:356-380 (registration)Registers the task_list tool with the MCP server, including its description and input schema for parameters like ticket_id, status, limit, and offset.Tool( name="task_list", description="PROJECT MANAGEMENT (TPM): List task IDs with status. Returns id, ticket_id, status only - use task_get for details.", inputSchema={ "type": "object", "properties": { "ticket_id": {"type": "string", "description": "Filter by ticket ID"}, "status": { "type": "string", "enum": ["pending", "in-progress", "done", "blocked"], "description": "Filter by status", }, "limit": { "type": "integer", "description": "Max tasks to return (default: 50, max: 200)", "default": 50, }, "offset": { "type": "integer", "description": "Skip first N tasks for pagination (default: 0)", "default": 0, }, }, }, ),
- src/tpm_mcp/server.py:356-380 (schema)Defines the input schema for the task_list tool, specifying properties for filtering and pagination.Tool( name="task_list", description="PROJECT MANAGEMENT (TPM): List task IDs with status. Returns id, ticket_id, status only - use task_get for details.", inputSchema={ "type": "object", "properties": { "ticket_id": {"type": "string", "description": "Filter by ticket ID"}, "status": { "type": "string", "enum": ["pending", "in-progress", "done", "blocked"], "description": "Filter by status", }, "limit": { "type": "integer", "description": "Max tasks to return (default: 50, max: 200)", "default": 50, }, "offset": { "type": "integer", "description": "Skip first N tasks for pagination (default: 0)", "default": 0, }, }, }, ),