Skip to main content
Glama
washyu
by washyu

delete_proxmox_vm_preview

Read-onlyIdempotent

Preview the impact of deleting a Proxmox VM or container with a dry-run report, without actually removing it.

Instructions

Preview what delete_proxmox_vm would affect without executing. Returns a structured dry-run report. No VM is deleted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeYesNode name
vmidYesVM/Container ID to delete
vm_typeNoType: 'qemu' for VM or 'lxc' for containerqemu
purgeNoRemove from all related configurations
hostNoProxmox host (optional)

Implementation Reference

  • Handler for delete_proxmox_vm_preview. Delegates to handle_delete_proxmox_vm with dry_run=True injected, so no VM is actually deleted.
    async def handle_delete_proxmox_vm_preview(arguments: dict[str, Any]) -> dict[str, Any]:
        """Handle delete_proxmox_vm_preview tool.
    
        Delegates to handle_delete_proxmox_vm with dry_run=True injected.
        No VM is deleted.
        """
        return await handle_delete_proxmox_vm({**arguments, "dry_run": True})
  • The handle_delete_proxmox_vm function that the preview delegates to. When dry_run=True (line 195), it fetches VM status and returns a build_dry_run_response without executing deletion.
    async def handle_delete_proxmox_vm(arguments: dict[str, Any]) -> dict[str, Any]:
        """Handle delete_proxmox_vm tool."""
        from ..server import get_resource_manager
    
        if host := arguments.get("host"):
            validate_hostname(host)
    
        if arguments.get("dry_run", False):
            from ..dry_run import build_dry_run_response
    
            vm_status = await get_proxmox_vm_status(
                node=arguments["node"],
                vmid=arguments["vmid"],
                host=arguments.get("host"),
                vm_type=arguments.get("vm_type", "qemu"),
                session=get_resource_manager().proxmox_session,
            )
            would_affect: list[dict[str, Any]] = [
                {
                    "resource_type": "proxmox_vm",
                    "node": arguments["node"],
                    "vmid": arguments["vmid"],
                    "vm_type": arguments.get("vm_type", "qemu"),
                }
            ]
            result = build_dry_run_response(
                tool_name="delete_proxmox_vm",
                would_affect=would_affect,
                risk_level="high",
                reversible=False,
                preview_details=vm_status,
            )
            return result
    
        result = await delete_proxmox_vm(
            node=arguments["node"],
            vmid=arguments["vmid"],
            host=arguments.get("host"),
            vm_type=arguments.get("vm_type", "qemu"),
            purge=arguments.get("purge", False),
            session=get_resource_manager().proxmox_session,
        )
        return {"content": [{"type": "text", "text": json.dumps(result, indent=2)}]}
  • Input schema for delete_proxmox_vm_preview. Accepts node, vmid (required), plus optional vm_type, purge, and host.
    PROXMOX_TOOLS["delete_proxmox_vm_preview"] = {
        "description": (
            "Preview what delete_proxmox_vm would affect without executing. "
            "Returns a structured dry-run report. No VM is deleted."
        ),
        "inputSchema": {
            "type": "object",
            "properties": {
                "node": {
                    "type": "string",
                    "description": "Node name",
                },
                "vmid": {
                    "type": "integer",
                    "description": "VM/Container ID to delete",
                },
                "vm_type": {
                    "type": "string",
                    "description": "Type: 'qemu' for VM or 'lxc' for container",
                    "enum": ["qemu", "lxc"],
                    "default": "qemu",
                },
                "purge": {
                    "type": "boolean",
                    "description": "Remove from all related configurations",
                    "default": False,
                },
                "host": {
                    "type": "string",
                    "description": "Proxmox host (optional)",
                },
            },
            "required": ["node", "vmid"],
        },
    }
  • Import of handle_delete_proxmox_vm_preview from proxmox_handlers module.
    handle_delete_proxmox_vm_preview,
  • Registration of 'delete_proxmox_vm_preview' in the TOOL_HANDLERS mapping, associating it with handle_delete_proxmox_vm_preview.
    "delete_proxmox_vm_preview": handle_delete_proxmox_vm_preview,
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint and destructiveHint, and the description adds that it returns a dry-run report and no VM is deleted, which is consistent. It does not detail report structure but suffices.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero wasted words, front-loaded with key action and scope. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the preview nature and rich annotations, the description is largely complete. It lacks details about the dry-run report output and potential error cases, but overall adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with per-parameter descriptions, so the description adds minimal value. It implies parameters map to the deletion tool, but no new semantics are introduced.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the verb 'Preview' and clearly identifies the resource ('what delete_proxmox_vm would affect'), distinguishing it from the sibling tool `delete_proxmox_vm`.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage before executing `delete_proxmox_vm` by naming that tool directly, but it does not explicitly state when not to use or list alternatives (though other preview tools are for different resources).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/washyu/homelab_mcp'

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