Skip to main content
Glama

nexus_restore_keystone

Restore a Workflowy node tree from a NEXUS Keystone backup to recover hierarchical outlines and tasks.

Instructions

Restore a Workflowy node tree from a NEXUS Keystone backup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keystone_idYes

Implementation Reference

  • Tool registration in the MCP server using @mcp.tool decorator, delegates to client.nexus_restore_keystone method.
    @mcp.tool( name="nexus_restore_keystone", description="Restore a Workflowy node tree from a NEXUS Keystone backup." ) async def nexus_restore_keystone(keystone_id: str) -> dict: """Restore a Workflowy node tree from a NEXUS Keystone backup.""" client = get_client() return await client.nexus_restore_keystone(keystone_id)
  • Main handler function: finds the keystone JSON backup file by ID in the backups directory and calls bulk_import_from_file to restore the node tree.
    async def nexus_restore_keystone(self, keystone_id: str) -> dict[str, Any]: """Restore from Keystone backup.""" backup_dir = r"E:\__daniel347x\__Obsidian\__Inking into Mind\--TypingMind\Projects - All\Projects - Individual\TODO\temp\nexus_backups" target_file = None for filename in os.listdir(backup_dir): if keystone_id in filename and filename.endswith(".json"): target_file = os.path.join(backup_dir, filename) break if not target_file: return {"success": False, "error": f"Keystone '{keystone_id}' not found"} return await self.bulk_import_from_file(json_file=target_file)
  • Keystone backup creation during bulk export: copies the exported JSON to a timestamped file in nexus_backups directory with node name slug and short UUID.
    # Create Keystone keystone_path = None try: import shutil import uuid backup_dir = r"E:\__daniel347x\__Obsidian\__Inking into Mind\--TypingMind\Projects - All\Projects - Individual\TODO\temp\nexus_backups" os.makedirs(backup_dir, exist_ok=True) timestamp = datetime.now().strftime("%Y%m%d-%H%M%S") node_name_slug = "".join(c for c in root_node_info.get('name', 'Unknown') if c.isalnum() or c in " _-").rstrip()[:50] short_uuid = str(uuid.uuid4())[:6] keystone_filename = f"{timestamp}-{node_name_slug}-{short_uuid}.json" keystone_path = os.path.join(backup_dir, keystone_filename) shutil.copy2(output_file, keystone_path) except Exception as e: print(f"Keystone backup failed: {e}") return { "success": True, "file_path": output_file, "markdown_file": markdown_file, "keystone_backup_path": keystone_path,
  • Related tool registration: lists available keystones by scanning the backups directory.
    @mcp.tool( name="nexus_list_keystones", description="List all available NEXUS Keystone backups." ) def nexus_list_keystones() -> dict: """List all available NEXUS Keystone backups.""" client = get_client() return client.nexus_list_keystones()
  • Helper: scans nexus_backups directory and parses filenames to list available keystones with metadata.
    def nexus_list_keystones(self) -> dict[str, Any]: """List NEXUS Keystone backups.""" backup_dir = r"E:\__daniel347x\__Obsidian\__Inking into Mind\--TypingMind\Projects - All\Projects - Individual\TODO\temp\nexus_backups" if not os.path.exists(backup_dir): return {"success": True, "keystones": [], "message": "No backup dir"} keystones = [] for filename in os.listdir(backup_dir): if filename.endswith(".json"): parts = filename.replace('.json', '').split('-') if len(parts) >= 3: keystones.append({ "keystone_id": parts[-1], "timestamp": parts[0], "node_name": "-".join(parts[1:-1]), "filename": filename }) return { "success": True, "keystones": sorted(keystones, key=lambda k: k['timestamp'], reverse=True) }

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/daniel347x/workflowy-mcp-fixed'

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