handoff_list
View and manage saved conversation transfers between AI chats or projects using lightweight metadata summaries. Opens interactive interface when available.
Instructions
List all saved handoffs with summaries. Returns lightweight metadata without full conversation content. Opens interactive UI if supported.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:350-384 (handler)Main handler function for handoff_list tool. Gets storage, calls storage.list() to retrieve all handoff summaries, logs the tool call, and returns results with both text content and structuredContent.async (): Promise<CallToolResult> => { const audit = getAuditLogger(); const timer = audit.startTimer(); const { storage } = await getStorage(); const result = await storage.list(); audit.logTool({ event: "tool_call", toolName: "handoff_list", durationMs: timer.elapsed(), success: result.success, error: result.error, }); if (!result.success) { return { content: [{ type: "text", text: `❌ Error: ${result.error}` }], }; } const handoffs = result.data || []; if (handoffs.length === 0) { return { content: [{ type: "text", text: "No handoffs saved. Use handoff_save to create one." }], structuredContent: { count: 0, handoffs: [] }, }; } return { content: [{ type: "text", text: JSON.stringify(handoffs, null, 2) }], structuredContent: { count: handoffs.length, handoffs }, }; }
- src/index.ts:324-385 (registration)Tool registration using registerAppTool with MCP Apps UI support. Defines tool name, title, description, empty input schema, output schema, and UI resource URI for interactive viewing.// handoff_list (with MCP Apps UI support) registerAppTool( server, "handoff_list", { title: "Handoff List", description: "List all saved handoffs with summaries. Returns lightweight metadata without full conversation content. Opens interactive UI if supported.", inputSchema: {}, outputSchema: z.object({ count: z.number().describe("Number of handoffs"), handoffs: z .array( z.object({ key: z.string(), title: z.string(), summary: z.string(), from_ai: z.string(), from_project: z.string(), created_at: z.string(), }) ) .describe("List of handoffs"), }), _meta: { ui: { resourceUri: VIEWER_RESOURCE_URI } }, }, async (): Promise<CallToolResult> => { const audit = getAuditLogger(); const timer = audit.startTimer(); const { storage } = await getStorage(); const result = await storage.list(); audit.logTool({ event: "tool_call", toolName: "handoff_list", durationMs: timer.elapsed(), success: result.success, error: result.error, }); if (!result.success) { return { content: [{ type: "text", text: `❌ Error: ${result.error}` }], }; } const handoffs = result.data || []; if (handoffs.length === 0) { return { content: [{ type: "text", text: "No handoffs saved. Use handoff_save to create one." }], structuredContent: { count: 0, handoffs: [] }, }; } return { content: [{ type: "text", text: JSON.stringify(handoffs, null, 2) }], structuredContent: { count: handoffs.length, handoffs }, }; } );
- src/storage.ts:31-38 (schema)HandoffSummary interface defining the structure of each handoff summary returned by the list method (excludes full conversation content).export interface HandoffSummary { key: string; title: string; from_ai: string; from_project: string; created_at: string; summary: string; }
- src/storage.ts:210-225 (handler)LocalStorage.list() implementation that returns all handoffs as summary objects without full conversation content. Maps internal handoffs Map to array of HandoffSummary objects./** * List all saved handoffs (summaries only, no conversation content). * @returns Result with array of handoff summaries */ async list(): Promise<StorageResult<HandoffSummary[]>> { const summaries: HandoffSummary[] = Array.from(this.handoffs.values()).map((h) => ({ key: h.key, title: h.title, from_ai: h.from_ai, from_project: h.from_project, created_at: h.created_at, summary: h.summary, })); return { success: true, data: summaries }; }
- src/storage.ts:636-638 (handler)RemoteStorage.list() implementation that makes a GET request to the HTTP server's /handoff endpoint to retrieve handoff summaries from a remote server.async list(): Promise<StorageResult<HandoffSummary[]>> { return this.request("GET", "/handoff"); }