sun_get_summary
Retrieve the content of a specific summary file generated by the Sun MCP Server, enabling quick access to key insights, outcomes, and next steps from chat sessions.
Instructions
Get content of a specific summary file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Name of the summary file to retrieve |
Implementation Reference
- src/server.ts:219-249 (handler)The primary handler function for the 'sun_get_summary' tool. It extracts the filename from arguments, calls fileManager.getSummary to retrieve the file content, and returns it formatted as MCP content or an error if not found.private async handleGetSummary(args: any) { const { filename } = args; if (!filename) { throw new Error('Filename is required'); } const content = await this.fileManager.getSummary(filename); if (!content) { return { content: [ { type: 'text', text: `❌ 未找到文件: ${filename}`, }, ], }; } return { content: [ { type: 'text', text: `📄 **${filename}** ${content}`, }, ], }; }
- src/server.ts:80-93 (registration)Registration of the 'sun_get_summary' tool in the ListToolsRequestSchema handler, including its description and input schema defining the required 'filename' parameter.{ name: 'sun_get_summary', description: 'Get content of a specific summary file', inputSchema: { type: 'object', properties: { filename: { type: 'string', description: 'Name of the summary file to retrieve', }, }, required: ['filename'], }, },
- src/server.ts:83-92 (schema)Input schema for the 'sun_get_summary' tool, specifying an object with a required 'filename' string property.inputSchema: { type: 'object', properties: { filename: { type: 'string', description: 'Name of the summary file to retrieve', }, }, required: ['filename'], },
- src/server.ts:110-111 (handler)Dispatch case in the CallToolRequestSchema handler that routes 'sun_get_summary' calls to the handleGetSummary method.case 'sun_get_summary': return await this.handleGetSummary(args);