board_get_task
Retrieve a single task's complete record by providing its ID. Returns all fields including status, priority, and timestamps; returns error if task does not exist.
Instructions
Fetch a single task by its ID. Use this when you have a task ID (from board_create_task, a handoff note, or an activity_log entry) and need the full task record — for listing many tasks under a project, use board_get_tasks instead. Returns every field: 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). Returns { error } when the task doesn't exist rather than throwing — callers should check for the error key before treating the result as a task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task_id | Yes | Task ID to fetch. Get this from the response of board_create_task, from handoff notes, or from activity_log entries. |
Implementation Reference
- src/tools/tasks.ts:431-468 (handler)The handler function for the 'board_get_task' tool. Fetches a single task by its ID from Firestore. Queries the 'tasks' collection by document ID, returns {error} if not found, otherwise returns all task fields with ISO timestamp conversions.
server.tool( "board_get_task", "Fetch a single task by its ID. Use this when you have a task ID (from board_create_task, a handoff note, or an activity_log entry) and need the full task record — for listing many tasks under a project, use board_get_tasks instead. Returns every field: 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). Returns { error } when the task doesn't exist rather than throwing — callers should check for the error key before treating the result as a task.", { task_id: z.string().describe("Task ID to fetch. Get this from the response of board_create_task, from handoff notes, or from activity_log entries."), }, async ({ task_id }) => { const snap = await db.collection("tasks").doc(task_id).get(); if (!snap.exists) { return { content: [ { type: "text" as const, text: JSON.stringify({ error: `Task ${task_id} not found` }), }, ], }; } const data = snap.data() ?? {}; const toISO = (v: unknown) => v && typeof v === "object" && "toDate" in (v as object) ? (v as { toDate(): Date }).toDate().toISOString() : null; const task = { id: snap.id, ...data, created_at: toISO((data as Record<string, unknown>).created_at), updated_at: toISO((data as Record<string, unknown>).updated_at), started_at: toISO((data as Record<string, unknown>).started_at), completed_at: toISO((data as Record<string, unknown>).completed_at), }; return { content: [ { type: "text" as const, text: JSON.stringify(task, null, 2) }, ], }; } ); - src/tools/tasks.ts:434-436 (schema)Input schema for board_get_task: requires a single 'task_id' string parameter.
{ task_id: z.string().describe("Task ID to fetch. Get this from the response of board_create_task, from handoff notes, or from activity_log entries."), }, - src/tools/tasks.ts:431-468 (registration)Registration of 'board_get_task' via server.tool() inside the registerTaskTools function, which is called from src/index.ts line 29.
server.tool( "board_get_task", "Fetch a single task by its ID. Use this when you have a task ID (from board_create_task, a handoff note, or an activity_log entry) and need the full task record — for listing many tasks under a project, use board_get_tasks instead. Returns every field: 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). Returns { error } when the task doesn't exist rather than throwing — callers should check for the error key before treating the result as a task.", { task_id: z.string().describe("Task ID to fetch. Get this from the response of board_create_task, from handoff notes, or from activity_log entries."), }, async ({ task_id }) => { const snap = await db.collection("tasks").doc(task_id).get(); if (!snap.exists) { return { content: [ { type: "text" as const, text: JSON.stringify({ error: `Task ${task_id} not found` }), }, ], }; } const data = snap.data() ?? {}; const toISO = (v: unknown) => v && typeof v === "object" && "toDate" in (v as object) ? (v as { toDate(): Date }).toDate().toISOString() : null; const task = { id: snap.id, ...data, created_at: toISO((data as Record<string, unknown>).created_at), updated_at: toISO((data as Record<string, unknown>).updated_at), started_at: toISO((data as Record<string, unknown>).started_at), completed_at: toISO((data as Record<string, unknown>).completed_at), }; return { content: [ { type: "text" as const, text: JSON.stringify(task, null, 2) }, ], }; } );