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;

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