board_end_session
End the current session with a progress summary and handoff notes, ensuring that completed work and pending tasks are visible to the next session for continuity.
Instructions
End the current session with a progress summary and handoff notes. This is the single most important call for cross-session continuity — without it, everything you did this session is invisible to the next one. Marks the session status='completed' and sets ended_at=now. The next board_create_session will surface this session's progress_summary, handoff_notes, and context_artifacts in its handoff response. Reference specific task IDs in handoff_notes (the next session reads this as prose, not a parsed list). Returns { session_id, status, message }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | Session ID to end (the session_id returned from board_create_session at the start of this session) | |
| progress_summary | Yes | 1-3 sentences on what was accomplished this session. Shown verbatim at the start of the next session's handoff. | |
| handoff_notes | No | Prose notes for the next session — reference task IDs for pending work ('task X is blocked on Y'), not vague descriptions. What the next agent needs to know to continue. | |
| context_artifacts | No | Structured context. Recognized keys: files_modified (paths touched), decisions_made (choices that set direction), blockers (what stopped progress), next_steps (what the next session should do). Additional keys allowed — passthrough. |
Implementation Reference
- src/tools/sessions.ts:89-163 (handler)The 'board_end_session' tool handler implementation. Defines the tool with schema (session_id required, progress_summary, handoff_notes, context_artifacts options), updates the session document to 'completed' status, logs to activity_log, and returns session_id/status/message.
server.tool( "board_end_session", "End the current session with a progress summary and handoff notes. This is the single most important call for cross-session continuity — without it, everything you did this session is invisible to the next one. Marks the session status='completed' and sets ended_at=now. The next board_create_session will surface this session's progress_summary, handoff_notes, and context_artifacts in its handoff response. Reference specific task IDs in handoff_notes (the next session reads this as prose, not a parsed list). Returns { session_id, status, message }.", { session_id: z.string().describe("Session ID to end (the session_id returned from board_create_session at the start of this session)"), progress_summary: z .string() .describe("1-3 sentences on what was accomplished this session. Shown verbatim at the start of the next session's handoff."), handoff_notes: z .string() .optional() .describe("Prose notes for the next session — reference task IDs for pending work ('task X is blocked on Y'), not vague descriptions. What the next agent needs to know to continue."), context_artifacts: z .object({ files_modified: z.array(z.string()).optional(), decisions_made: z.array(z.string()).optional(), blockers: z.array(z.string()).optional(), next_steps: z.array(z.string()).optional(), }) .passthrough() .optional() .describe("Structured context. Recognized keys: files_modified (paths touched), decisions_made (choices that set direction), blockers (what stopped progress), next_steps (what the next session should do). Additional keys allowed — passthrough."), }, async ({ session_id, progress_summary, handoff_notes, context_artifacts }) => { const sessionRef = db.collection("sessions").doc(session_id); const sessionSnap = await sessionRef.get(); if (!sessionSnap.exists) { return { content: [ { type: "text" as const, text: JSON.stringify({ error: `Session ${session_id} not found` }), }, ], }; } const now = Timestamp.now(); await sessionRef.update({ status: "completed", ended_at: now, progress_summary, handoff_notes: handoff_notes ?? null, context_artifacts: context_artifacts ?? {}, }); await db.collection("activity_log").add({ task_id: null, session_id, agent_name: "system", action: "session_ended", details: progress_summary, metadata: {}, created_at: now, }); return { content: [ { type: "text" as const, text: JSON.stringify( { session_id, status: "completed", message: "Session ended successfully. Handoff notes saved.", }, null, 2 ), }, ], }; } ); - src/tools/sessions.ts:92-111 (schema)Input schema for board_end_session: session_id (string), progress_summary (string), handoff_notes (optional string), and context_artifacts (optional object with files_modified, decisions_made, blockers, next_steps arrays plus passthrough).
{ session_id: z.string().describe("Session ID to end (the session_id returned from board_create_session at the start of this session)"), progress_summary: z .string() .describe("1-3 sentences on what was accomplished this session. Shown verbatim at the start of the next session's handoff."), handoff_notes: z .string() .optional() .describe("Prose notes for the next session — reference task IDs for pending work ('task X is blocked on Y'), not vague descriptions. What the next agent needs to know to continue."), context_artifacts: z .object({ files_modified: z.array(z.string()).optional(), decisions_made: z.array(z.string()).optional(), blockers: z.array(z.string()).optional(), next_steps: z.array(z.string()).optional(), }) .passthrough() .optional() .describe("Structured context. Recognized keys: files_modified (paths touched), decisions_made (choices that set direction), blockers (what stopped progress), next_steps (what the next session should do). Additional keys allowed — passthrough."), }, - src/tools/sessions.ts:5-5 (registration)The registration function 'registerSessionTools' is exported from sessions.ts and called in index.ts line 30 with the MCP server and Firestore db.
export function registerSessionTools(server: McpServer, db: Firestore) {