sun_list_summaries
Retrieve and view all saved session summaries generated by the Sun MCP Server, providing access to structured insights, outcomes, and next steps from past conversations.
Instructions
List all saved session summaries
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:180-217 (handler)The handler function that implements the core logic of the 'sun_list_summaries' tool. It retrieves the list of summaries using fileManager.listSummaries(), formats them nicely with details like creation date, functionality, and status, and returns a formatted text response. Handles empty list case.private async handleListSummaries() { const summaries = await this.fileManager.listSummaries(); if (summaries.length === 0) { return { content: [ { type: 'text', text: '📂 暂无保存的会话总结\n\n使用 `-sun` 命令创建第一个会话总结!', }, ], }; } const summaryList = summaries .map((file, index) => { const date = new Date(file.createdAt).toLocaleString('zh-CN'); return `${index + 1}. **${file.filename}** 📅 创建时间: ${date} 🎯 功能: ${file.summary.functionality} 📊 状态: ${file.summary.completionStatus}`; }) .join('\n\n'); return { content: [ { type: 'text', text: `📂 **已保存的会话总结** (${summaries.length}个) ${summaryList} --- 使用 \`sun_get_summary\` 获取特定总结的详细内容`, }, ], }; }
- src/server.ts:72-79 (registration)Registration of the 'sun_list_summaries' tool in the ListToolsRequestSchema handler. Includes the tool name, description, and empty input schema (no parameters required).{ name: 'sun_list_summaries', description: 'List all saved session summaries', inputSchema: { type: 'object', properties: {}, }, },
- src/server.ts:75-78 (schema)Input schema for the 'sun_list_summaries' tool, defining an empty object (no input parameters needed).inputSchema: { type: 'object', properties: {}, },
- src/server.ts:107-108 (handler)Dispatch case in the CallToolRequestSchema handler that routes calls to 'sun_list_summaries' to the specific handleListSummaries method.case 'sun_list_summaries': return await this.handleListSummaries();