board_get_tasks
List tasks in a project with filters for status, priority, and assigned agent. Results are sorted by priority and exclude done tasks by default.
Instructions
List tasks in a project with optional filters. Results are sorted client-side by priority (critical → low) — not by creation time. By default excludes done tasks (pass include_done=true or set status='done' to see them). Use this for mid-session checks: almost always pass a status filter (e.g., 'in_progress' or 'todo') to keep responses tight. For a single task by ID, use board_get_task instead. Returns an array of task objects with id, project_id, title, description, status, priority, assigned_agent, parent_task_id, depends_on, riper_mode, metadata, and ISO timestamps (created_at, updated_at, started_at, completed_at).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID (from board_get_projects) whose tasks to list | |
| status | No | Filter to a single status. Omit to return all non-done tasks (unless include_done=true). | |
| priority | No | Filter to a single priority. Omit to return all priorities. | |
| assigned_agent | No | Filter to tasks assigned to this agent name (exact match). Omit to return all assignments. | |
| include_done | No | Include tasks with status='done' (default false — done tasks are hidden to keep responses small). Ignored if an explicit status filter is set. |
Implementation Reference
- src/tools/tasks.ts:5-91 (handler)The handler function registered as 'board_get_tasks'. Queries Firestore 'tasks' collection filtered by project_id and optional status/priority/assigned_agent/include_done, sorts by priority (critical first), and returns JSON stringified task objects.
export function registerTaskTools(server: McpServer, db: Firestore) { server.tool( "board_get_tasks", "List tasks in a project with optional filters. Results are sorted client-side by priority (critical → low) — not by creation time. By default excludes done tasks (pass include_done=true or set status='done' to see them). Use this for mid-session checks: almost always pass a status filter (e.g., 'in_progress' or 'todo') to keep responses tight. For a single task by ID, use board_get_task instead. Returns an array of task objects with id, project_id, title, description, status, priority, assigned_agent, parent_task_id, depends_on, riper_mode, metadata, and ISO timestamps (created_at, updated_at, started_at, completed_at).", { project_id: z.string().describe("Project ID (from board_get_projects) whose tasks to list"), status: z .enum(["backlog", "todo", "in_progress", "blocked", "review", "done"]) .optional() .describe("Filter to a single status. Omit to return all non-done tasks (unless include_done=true)."), priority: z .enum(["critical", "high", "medium", "low"]) .optional() .describe("Filter to a single priority. Omit to return all priorities."), assigned_agent: z .string() .optional() .describe("Filter to tasks assigned to this agent name (exact match). Omit to return all assignments."), include_done: z .boolean() .optional() .describe("Include tasks with status='done' (default false — done tasks are hidden to keep responses small). Ignored if an explicit status filter is set."), }, async ({ project_id, status, priority, assigned_agent, include_done }) => { let query: FirebaseFirestore.Query<FirebaseFirestore.DocumentData> = db .collection("tasks") .where("project_id", "==", project_id); if (status) { query = query.where("status", "==", status); } else if (!include_done) { query = query.where("status", "!=", "done"); } if (priority) { query = query.where("priority", "==", priority); } if (assigned_agent) { query = query.where("assigned_agent", "==", assigned_agent); } const snapshot = await query.get(); const priorityOrder: Record<string, number> = { critical: 0, high: 1, medium: 2, low: 3, }; const tasks = snapshot.docs .map((doc) => { const data = doc.data(); return { id: doc.id, project_id: data.project_id as string, title: data.title as string, description: data.description as string | null, status: data.status as string, priority: data.priority as string, assigned_agent: data.assigned_agent as string | null, parent_task_id: data.parent_task_id as string | null, depends_on: data.depends_on as string[], riper_mode: data.riper_mode as string | null, metadata: data.metadata as Record<string, unknown>, created_at: data.created_at?.toDate?.()?.toISOString() ?? null, updated_at: data.updated_at?.toDate?.()?.toISOString() ?? null, started_at: data.started_at?.toDate?.()?.toISOString() ?? null, completed_at: data.completed_at?.toDate?.()?.toISOString() ?? null, }; }) .sort( (a, b) => (priorityOrder[a.priority] ?? 99) - (priorityOrder[b.priority] ?? 99) ); return { content: [ { type: "text" as const, text: JSON.stringify(tasks, null, 2), }, ], }; } ); - src/tools/tasks.ts:9-27 (schema)Zod schema defining input parameters: required project_id, optional status (enum), priority (enum), assigned_agent (string), and include_done (boolean) for filtering tasks.
{ project_id: z.string().describe("Project ID (from board_get_projects) whose tasks to list"), status: z .enum(["backlog", "todo", "in_progress", "blocked", "review", "done"]) .optional() .describe("Filter to a single status. Omit to return all non-done tasks (unless include_done=true)."), priority: z .enum(["critical", "high", "medium", "low"]) .optional() .describe("Filter to a single priority. Omit to return all priorities."), assigned_agent: z .string() .optional() .describe("Filter to tasks assigned to this agent name (exact match). Omit to return all assignments."), include_done: z .boolean() .optional() .describe("Include tasks with status='done' (default false — done tasks are hidden to keep responses small). Ignored if an explicit status filter is set."), }, - src/index.ts:29-29 (registration)Registration call that wires registerTaskTools into the MCP server at startup.
registerTaskTools(server, db);