Skip to main content
Glama

list_summaries

Retrieve previously generated weekly summaries from your productivity data, with options to filter by format, sort order, and limit results.

Instructions

List previously generated weekly summaries from the summaries directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of summaries to return (default: 10)
sortNoSort order (default: newest)newest
formatNoFilter by format (default: all)all

Implementation Reference

  • The core handler function `listSummaries` that executes the tool logic: fetches summary files, parses metadata, and returns a structured list.
    export async function listSummaries(args) {
      try {
        const limit = args.limit || 10;
        const sort = args.sort || 'newest';
        const format = args.format || 'all';
        
        // Get file list
        const files = await listSummaryFiles({ format, sort, limit });
        
        // Build summary list with metadata
        const summaries = files.map(file => {
          const dateRange = parseDateRangeFromFilename(file.filename);
          const fileFormat = file.filename.endsWith('.html') ? 'html' : 'markdown';
          
          // Extract preview (would need to read file for actual preview)
          const preview = dateRange 
            ? `Summary for ${formatDisplayDate(dateRange.startDate)} to ${formatDisplayDate(dateRange.endDate)}`
            : 'Weekly summary';
          
          return {
            filename: file.filename,
            path: file.path,
            format: fileFormat,
            period: dateRange ? {
              start: dateRange.startDate,
              end: dateRange.endDate,
              days: Math.ceil((new Date(dateRange.endDate) - new Date(dateRange.startDate)) / (1000 * 60 * 60 * 24)),
            } : null,
            created: file.created.toISOString(),
            size_bytes: file.size,
            preview,
          };
        });
        
        return {
          success: true,
          summaries,
          total_count: summaries.length,
          filters: {
            format,
            sort,
            limit,
          },
        };
        
      } catch (error) {
        throw {
          code: 'LIST_FAILED',
          message: 'Failed to list summaries',
          details: error.message,
        };
      }
    }
  • Tool definition including name, description, and input JSON schema for validation.
    {
      name: 'list_summaries',
      description: 'List previously generated weekly summaries from the summaries directory.',
      inputSchema: {
        type: 'object',
        properties: {
          limit: {
            type: 'integer',
            description: 'Maximum number of summaries to return (default: 10)',
            default: 10,
            minimum: 1,
            maximum: 100,
          },
          sort: {
            type: 'string',
            enum: ['newest', 'oldest'],
            description: 'Sort order (default: newest)',
            default: 'newest',
          },
          format: {
            type: 'string',
            enum: ['all', 'html', 'markdown'],
            description: 'Filter by format (default: all)',
            default: 'all',
          },
        },
      },
    },
  • Registration in the central tool dispatcher switch statement, routing calls to the handler.
    case 'list_summaries':
      result = await listSummaries(args);
      break;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions listing from a directory but doesn't disclose behavioral traits like whether it's read-only (implied by 'List' but not explicit), potential rate limits, authentication needs, error handling, or output format details. This leaves significant gaps for a tool with no structured safety hints.

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's front-loaded and every part earns its place, making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given the tool has no annotations and no output schema, the description is incomplete. It doesn't explain what the returned summaries look like (e.g., list of files, metadata), potential pagination, or error cases. For a list operation with three parameters and no structured output info, more context is needed to guide effective use.

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, fully documenting all three parameters (limit, sort, format) with defaults and enums. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra value.

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 action ('List') and resource ('previously generated weekly summaries from the summaries directory'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'get_summary' or 'get_quick_stats', which might also retrieve summary-related data, so it doesn't reach the highest score.

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 such as 'get_summary' (which might fetch a single summary) or 'generate_weekly_summary' (which creates new ones). There's no mention of prerequisites, exclusions, or specific contexts, leaving usage unclear relative to siblings.

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/philipbloch/summary-mcp'

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