Skip to main content
Glama

sun_list_summaries

Retrieve all saved conversation summaries from the Sun MCP Server to review key insights, outcomes, and next steps from previous chat sessions.

Instructions

List all saved session summaries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler for 'sun_list_summaries' tool. Retrieves summaries from fileManager, handles empty list, formats a numbered list with creation date, functionality, and status, returns formatted Markdown text response.
      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, including name, description, and empty input schema (no parameters required).
    {
      name: 'sun_list_summaries',
      description: 'List all saved session summaries',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema for the 'sun_list_summaries' tool, defining an empty object (no input parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Supporting helper method in FileManager that lists all .mdc files in the .sun directory, parses each file's summary metadata using parseSummaryFromMarkdown, collects into SavedSummaryFile objects, sorts by newest first, and returns the array.
    async listSummaries(): Promise<SavedSummaryFile[]> {
      await this.ensureSunDirectory();
    
      try {
        const files = await fs.readdir(this.sunDir);
        const mdcFiles = files.filter(file => file.endsWith('.mdc'));
    
        const summaries: SavedSummaryFile[] = [];
    
        for (const filename of mdcFiles) {
          const filePath = path.join(this.sunDir, filename);
          const stats = await fs.stat(filePath);
    
          // Try to parse the summary from the file
          try {
            const content = await fs.readFile(filePath, 'utf-8');
            const summary = this.parseSummaryFromMarkdown(content, filename);
    
            summaries.push({
              filename,
              path: filePath,
              summary,
              createdAt: stats.birthtime.toISOString()
            });
          } catch (parseError) {
            console.warn(`Failed to parse summary from ${filename}:`, parseError);
          }
        }
    
        // Sort by creation time (newest first)
        return summaries.sort((a, b) =>
          new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
        );
      } catch (error) {
        console.error('Failed to list summaries:', error);
        throw error;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('List') but doesn't describe traits like whether this is a read-only operation, if it requires permissions, how results are returned (e.g., pagination, sorting), or potential side effects. This leaves significant gaps for a tool that interacts with saved data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly, and there is no wasted verbiage.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. However, it lacks context about the return format (e.g., list structure, summary fields) and behavioral aspects like error handling or data access constraints, which could be important for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here. A baseline of 4 is applied as it adequately handles the lack of parameters without introducing confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all saved session summaries'), making the purpose unambiguous. It doesn't explicitly differentiate from sibling tools like 'sun_get_summary' (which likely retrieves a specific summary) or 'sun_summarize' (which likely creates summaries), but the scope 'all saved' provides some implicit distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'sun_get_summary' or 'sun_summarize'. It lacks context about prerequisites, such as whether summaries must exist or if authentication is needed, and offers no explicit when-not-to-use scenarios or comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChenYCL/sun-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server