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
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes |
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)}"