nexus_purge_keystones
Delete NEXUS Keystone backup files to manage storage and remove outdated backups from the WorkFlowy MCP Server.
Instructions
Delete one or more NEXUS Keystone backup files.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keystone_ids | Yes |
Implementation Reference
- The main handler function that implements the logic to purge (delete) specified NEXUS Keystone backup files from the fixed backup directory. Matches files containing the keystone_id in their name and removes them.def nexus_purge_keystones(self, keystone_ids: list[str]) -> dict[str, Any]: """Delete Keystone backups.""" backup_dir = r"E:\__daniel347x\__Obsidian\__Inking into Mind\--TypingMind\Projects - All\Projects - Individual\TODO\temp\nexus_backups" purged = [] errors = [] for kid in keystone_ids: found = False for filename in os.listdir(backup_dir): if kid in filename and filename.endswith(".json"): try: os.remove(os.path.join(backup_dir, filename)) purged.append(filename) found = True break except Exception as e: errors.append(f"Failed to delete {filename}: {e}") if not found: errors.append(f"Keystone '{kid}' not found") return { "success": len(errors) == 0, "purged_count": len(purged), "purged_files": purged, "errors": errors }
- src/workflowy_mcp/server.py:2297-2306 (registration)FastMCP tool registration for 'nexus_purge_keystones'. Delegates to the WorkFlowyClient.nexus_purge_keystones method, providing the MCP interface.# Tool: Purge Nexus Keystones @mcp.tool( name="nexus_purge_keystones", description="Delete one or more NEXUS Keystone backup files." ) def nexus_purge_keystones(keystone_ids: list[str]) -> dict: """Delete one or more NEXUS Keystone backup files.""" client = get_client() return client.nexus_purge_keystones(keystone_ids)