Skip to main content
Glama
anortham

COA Goldfish MCP

by anortham

summarize_session

Generate AI-powered summaries of recent sessions or work to track accomplishments or analyze lengthy activities. Customize depth with highlights or detailed timelines based on sessionId, workspace, or time range.

Instructions

Create AI-condensed summary of session or recent work. Perfect for "what did I accomplish today?" or understanding long sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNoSummary depth: highlights=key points only, full=detailed timeline
sessionIdNoSpecific session to summarize (optional)
sinceNoTime range for summary when no sessionId (default: "1d")
workspaceNoWorkspace to summarize (optional)

Implementation Reference

  • The main handler function for the 'summarize_session' tool. Fetches relevant session memories (checkpoints), processes them to extract work areas, highlights, git branches, active files, and generates a comprehensive formatted summary report including overview stats, key accomplishments, recent progress, and involved files.
    async summarizeSession(args: {
      sessionId?: string;
      depth?: 'highlights' | 'full';
      workspace?: string;
      since?: string;
      format?: OutputMode;
    }) {
      const {
        sessionId,
        depth = 'highlights',
        workspace,
        since = '1d',
        format
      } = args;
    
      try {
        let memories: GoldfishMemory[] = [];
        let summaryTitle = '';
    
        if (sessionId) {
          memories = await this.getSessionMemories(sessionId, workspace);
          summaryTitle = `Session ${sessionId} Summary`;
        } else {
          // Summarize recent work
          memories = await this.searchEngine.searchMemories({
            type: 'checkpoint',
            since,
            workspace,
            scope: 'current',
            limit: 50
          });
          summaryTitle = `Work Summary (${since})`;
        }
    
        if (memories.length === 0) {
          return {
            content: [
              {
                type: 'text',
                text: 'πŸ“ No checkpoints found for summary. Create checkpoints as you work to enable session summaries.'
              }
            ]
          };
        }
    
        // Extract key information
        const workAreas = new Set<string>();
        const allHighlights: string[] = [];
        const gitBranches = new Set<string>();
        const activeFiles = new Set<string>();
        
        for (const memory of memories) {
          if (typeof memory.content === 'object' && memory.content) {
            const content = memory.content as { 
              description?: string; 
              workContext?: string; 
              gitBranch?: string; 
              activeFiles?: string[]; 
              highlights?: string[] 
            };
            
            // Collect work areas from descriptions
            if (content.description) {
              const workArea = this.extractWorkArea(content.description);
              if (workArea) workAreas.add(workArea);
            }
            
            // Collect highlights
            if (Array.isArray(content.highlights)) {
              allHighlights.push(...content.highlights);
            }
            
            // Collect git info
            if (content.gitBranch) {
              gitBranches.add(content.gitBranch);
            }
            
            // Collect files
            if (Array.isArray(content.activeFiles)) {
              content.activeFiles.forEach((file: string) => activeFiles.add(file));
            }
          }
        }
    
        // Build summary
        const output = [`πŸ“ **${summaryTitle}**\n`];
        
        output.push(`πŸ“Š **Overview:**`);
        output.push(`   β€’ ${memories.length} checkpoints`);
        output.push(`   β€’ ${workAreas.size} work areas`);
        if (gitBranches.size > 0) {
          output.push(`   β€’ Branches: ${Array.from(gitBranches).join(', ')}`);
        }
        output.push('');
    
        // Work areas
        if (workAreas.size > 0) {
          output.push('🎯 **Work Areas:**');
          Array.from(workAreas).forEach(area => {
            output.push(`   β€’ ${area}`);
          });
          output.push('');
        }
    
        // Key highlights
        const uniqueHighlights = [...new Set(allHighlights)];
        if (uniqueHighlights.length > 0) {
          output.push('✨ **Key Accomplishments:**');
          uniqueHighlights.slice(-8).forEach(highlight => {
            output.push(`   β€’ ${highlight}`);
          });
          output.push('');
        }
    
        // Recent progress (last few checkpoints)
        if (depth === 'full' && memories.length > 1) {
          output.push('πŸ”„ **Recent Progress:**');
          memories.slice(0, 5).forEach(memory => {
            const age = this.formatAge(memory.timestamp);
            if (typeof memory.content === 'object' && memory.content && 'description' in memory.content) {
              const contentObj = memory.content as { description?: string };
              output.push(`   β€’ ${age}: ${contentObj.description}`);
            }
          });
          output.push('');
        }
    
        // Active files
        if (activeFiles.size > 0) {
          output.push('πŸ“ **Files Involved:**');
          Array.from(activeFiles).slice(0, 10).forEach(file => {
            output.push(`   β€’ ${file}`);
          });
          if (activeFiles.size > 10) {
            output.push(`   ... and ${activeFiles.size - 10} more files`);
          }
        }
    
        const formatted = output.join('\n');
        const data = {
          sessionId: sessionId || undefined,
          timeRange: since,
          workspace,
          achievements: uniqueHighlights.slice(-5),
          nextSteps: [],
          stats: {
            checkpoints: memories.length,
            workAreas: Array.from(workAreas),
            branches: Array.from(gitBranches),
            files: Array.from(activeFiles).slice(0, 10)
          }
        } as const;
        return buildToolContent('session-summary', formatted, data as any, format);
        
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `❌ Summary failed: ${error instanceof Error ? error.message : String(error)}`
            }
          ]
        };
      }
    }
  • The JSON schema definition for the 'summarize_session' tool, specifying input parameters: sessionId (optional), depth ('highlights' or 'full'), workspace, since (time range), and format (output mode). Includes detailed descriptions for MCP tool registration.
    {
      name: 'summarize_session',
      description: 'ALWAYS summarize before ending work sessions. Use when user says "done for today" or asks about accomplishments. Creates shareable progress reports. Essential for handoffs and documentation.',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: {
            type: 'string',
            description: 'Specific session to summarize (optional)'
          },
          depth: {
            type: 'string',
            enum: ['highlights', 'full'],
            description: 'Summary depth: highlights=key points only, full=detailed timeline'
          },
          workspace: {
            type: 'string',
            description: 'Workspace name or path (e.g., "coa-goldfish-mcp" or "C:\\source\\COA Goldfish MCP"). Will be normalized automatically.'
          },
          since: {
            type: 'string',
            description: 'Time range for summary when no sessionId (default: "1d")'
          },
          format: {
            type: 'string',
            enum: ['plain', 'emoji', 'json', 'dual'],
            description: 'Output format override (defaults to env GOLDFISH_OUTPUT_MODE or dual)'
          }
        }
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions that the summary is 'AI-condensed,' it doesn't describe what this means in practice (e.g., format, length, or how the AI processes the data). It also omits important behavioral traits such as whether this operation is read-only or has side effects, authentication requirements, rate limits, or error handling. For a tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 appropriately sized and front-loaded: it starts with the core purpose ('Create AI-condensed summary of session or recent work'), then immediately provides practical use cases. Every sentence earns its place by adding valueβ€”the first defines the action, and the second gives context for application. There's no wasted verbiage or redundancy.

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 moderate complexity (4 parameters, no output schema, no annotations), the description is partially complete. It covers the purpose and usage context well, but lacks behavioral details (e.g., output format, side effects) that are crucial since there's no output schema or annotations. For a summary tool, users need to know what the summary looks like, but this isn't addressed. The description is adequate but has clear gaps in providing a full understanding.

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

Parameters3/5

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

The input schema has 100% description coverage, so all parameters are documented in the schema. The description doesn't add any additional meaning about the parameters beyond what's already in the schema (e.g., it doesn't explain the 'depth' options further or provide examples for 'since'). With high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't detract from the schema's documentation.

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 tool's purpose: 'Create AI-condensed summary of session or recent work.' It specifies the verb ('Create AI-condensed summary') and resource ('session or recent work'), and provides concrete use cases ('what did I accomplish today?' or 'understanding long sessions'). However, it doesn't explicitly differentiate from sibling tools like 'timeline' or 'search_history' which might also provide session-related information.

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

Usage Guidelines3/5

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

The description implies usage through example scenarios ('Perfect for "what did I accomplish today?" or understanding long sessions'), giving some context for when to use it. However, it doesn't provide explicit guidance on when to choose this tool over alternatives like 'timeline' or 'search_history', nor does it mention any prerequisites or exclusions. The usage context is helpful but incomplete.

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

Related 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/anortham/coa-goldfish-mcp'

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