Skip to main content
Glama
RalphLi213
by RalphLi213

delete_summary

Remove a saved chat summary file from your notes directory to manage your organized conversation archives.

Instructions

Delete a chat summary file.

Args: filename: Name of the summary file to delete

Returns: Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYes

Implementation Reference

  • main.py:520-547 (handler)
    The handler function for the 'delete_summary' MCP tool. It deletes the specified chat summary markdown file from the NOTES_DIR after verifying it exists and starts with 'chat_summary_'. Uses pathlib for file operations and includes error handling.
    @mcp.tool()
    def delete_summary(filename: str) -> str:
        """
        Delete a chat summary file.
        
        Args:
            filename: Name of the summary file to delete
        
        Returns:
            Confirmation message
        """
        try:
            if not ensure_notes_directory():
                return "Error: Could not access notes directory"
            
            filepath = NOTES_DIR / filename
            
            if not filepath.exists():
                return f"File not found: {filename}"
            
            if not filepath.name.startswith("chat_summary_"):
                return f"Can only delete chat summary files. File must start with 'chat_summary_'"
            
            filepath.unlink()
            return f"Successfully deleted: {filename}"
            
        except Exception as e:
            return f"Error deleting summary: {str(e)}"

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