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

  • Core implementation of the list_summaries tool handler. Lists summary files from the summaries directory, extracts metadata including date ranges, formats, and generates previews.
    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, }; } }
  • Input schema and metadata definition for the list_summaries tool, including parameters for limit, sort, and format.
    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 and dispatching of the list_summaries tool in the central tool handler switch statement.
    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