remove_vm_preview
Preview the impact of removing a VM without executing the removal. Returns a structured dry-run report showing what would be affected.
Instructions
Preview what remove_vm would affect without executing. Returns a structured dry-run report. No infrastructure is modified.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | Database ID of the target device | |
| platform | Yes | VM platform | |
| vm_name | Yes | Name of the VM/container | |
| force | No | Force removal without graceful shutdown |
Implementation Reference
- The handler function for the remove_vm_preview tool. It delegates to handle_remove_vm with dry_run=True injected, so no VM is actually removed.
async def handle_remove_vm_preview(arguments: dict[str, Any]) -> dict[str, Any]: """Handle remove_vm_preview tool. Delegates to handle_remove_vm with dry_run=True injected. No VM is removed. """ return await handle_remove_vm({**arguments, "dry_run": True}) - Schema definition for remove_vm_preview. Defines the inputSchema with required fields: device_id (integer), platform (enum: docker/lxd), vm_name (string), and optional force (boolean).
VM_TOOLS["remove_vm_preview"] = { "description": ( "Preview what remove_vm would affect without executing. " "Returns a structured dry-run report. No infrastructure is modified." ), "inputSchema": { "type": "object", "properties": { "device_id": { "type": "integer", "description": "Database ID of the target device", }, "platform": { "type": "string", "enum": ["docker", "lxd"], "description": "VM platform", }, "vm_name": { "type": "string", "description": "Name of the VM/container", }, "force": { "type": "boolean", "default": False, "description": "Force removal without graceful shutdown", }, }, "required": ["device_id", "platform", "vm_name"], }, } - src/homelab_mcp/tool_handlers/__init__.py:76-76 (registration)Import of handle_remove_vm_preview from vm_handlers.
handle_remove_vm_preview, - src/homelab_mcp/tool_handlers/__init__.py:119-119 (registration)Registration mapping 'remove_vm_preview' tool name to the handle_remove_vm_preview handler function in the TOOL_HANDLERS registry.
"remove_vm_preview": handle_remove_vm_preview, - src/homelab_mcp/tool_annotations.py:48-48 (registration)Listed as a dry-run/preview tool in tool_annotations.py, indicating it's a non-destructive preview operation.
"remove_vm_preview",