Skip to main content
Glama
RalphLi213
by RalphLi213

list_summaries

Retrieve recent chat summaries from your notes directory to review past AI conversations. Specify a limit to control how many summaries appear.

Instructions

List recent chat summaries from the notes directory.

Args: limit: Maximum number of summaries to list (default: 10)

Returns: List of recent summary files with their creation dates

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • main.py:472-518 (handler)
    The core handler function for the 'list_summaries' MCP tool. It lists recent chat summary markdown files from the configured notes directory, sorts them by modification time (newest first), limits to the specified number, extracts display names from filenames, and formats a markdown-style list with dates and sizes. The @mcp.tool() decorator registers this function as an MCP tool.
    @mcp.tool()
    def list_summaries(limit: int = 10) -> str:
        """
        List recent chat summaries from the notes directory.
        
        Args:
            limit: Maximum number of summaries to list (default: 10)
        
        Returns:
            List of recent summary files with their creation dates
        """
        try:
            if not ensure_notes_directory():
                return "Error: Could not access notes directory"
            
            # Find all chat summary files
            summary_files = list(NOTES_DIR.glob("chat_summary_*.md"))
            
            if not summary_files:
                return "No chat summaries found in the notes directory."
            
            # Sort by modification time (newest first)
            summary_files.sort(key=lambda x: x.stat().st_mtime, reverse=True)
            
            # Limit results
            summary_files = summary_files[:limit]
            
            result = f"Recent Chat Summaries (showing {len(summary_files)} of {len(list(NOTES_DIR.glob('chat_summary_*.md')))} total):\n\n"
            
            for file in summary_files:
                # Get file stats
                stat = file.stat()
                created = datetime.fromtimestamp(stat.st_ctime).strftime("%Y-%m-%d %H:%M")
                size_kb = round(stat.st_size / 1024, 1)
                
                # Try to extract title from filename
                name_parts = file.stem.replace("chat_summary_", "").split("_", 2)
                display_name = name_parts[2] if len(name_parts) > 2 else "Untitled"
                display_name = display_name.replace("_", " ")
                
                result += f"**{display_name}**\n"
                result += f"   {created} | {size_kb} KB | {file.name}\n\n"
            
            return result
            
        except Exception as e:
            return f"Error listing summaries: {str(e)}"
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. It states the tool lists 'recent' summaries and returns files with creation dates, but lacks details on what 'recent' means (e.g., time-based criteria), how ordering works, error handling, or permissions needed. For a tool with no annotation coverage, this leaves significant behavioral gaps.

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 well-structured and concise, with a clear purpose statement followed by separate 'Args' and 'Returns' sections. Every sentence adds value: the first defines the action, and the others detail inputs and outputs without redundancy. It's appropriately sized for a simple list tool.

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

Completeness4/5

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

Given the tool's low complexity (one optional parameter) and the presence of an output schema (which handles return values), the description is mostly complete. It covers the purpose, parameter semantics, and return overview. However, it lacks behavioral details like ordering or error handling, which would be beneficial even with an output schema, keeping it from a perfect score.

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 description adds meaningful context for the single parameter 'limit,' explaining it's the 'Maximum number of summaries to list' with a default of 10. Since schema description coverage is 0% (the schema only provides a title and type), the description fully compensates by clarifying the parameter's purpose and default value, going beyond what the schema provides.

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: 'List recent chat summaries from the notes directory.' It specifies the verb ('List'), resource ('chat summaries'), and location ('notes directory'). However, it doesn't explicitly differentiate from sibling tools like 'summarize_chat' (which creates summaries) or 'delete_summary' (which removes them), though the 'list' vs 'create/delete' distinction is implied.

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. It doesn't mention sibling tools like 'summarize_chat' for creating summaries or 'delete_summary' for removal, nor does it specify prerequisites (e.g., existing summaries in the directory). Usage is implied by the action 'list,' but no explicit context or exclusions are given.

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/RalphLi213/ide-chat-summarizer-mcp'

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