Skip to main content
Glama
CyberKnightLabs

vmware-knight

vm_migrate

Migrate a virtual machine to another host or datastore via vMotion. Preview the blast radius first, then confirm to execute the migration.

Instructions

[WRITE] Migrate (vMotion) a VM to another host, optionally with storage vMotion.

Without confirm=True this only previews: it returns blast_radius (VM and instance UUID, source host and datastores, target host with its connection and maintenance state, target datastore, and live vMotion vs cold migration) and moves nothing. Show it to the user and get their decision. Do not set confirm=True on your own because the user asked earlier: they have not seen the preview yet.

Refused: a target host that is not found, not connected, in maintenance mode or outside a cluster; a target datastore that is not found; a target host that does not mount the VM's datastores when to_datastore is omitted (vCenter rejects cross-host vMotion without shared storage — pass to_datastore); and anything above that cannot be read. The VM's current host with no to_datastore returns action "noop". Run cluster_info first for host names.

Returns: Dict with action (preview, noop, migrated), blast_radius, and result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNovCenter/ESXi target name from config.
confirmNoFalse (default) returns the blast radius and changes nothing. True applies it.
to_hostYesTarget ESXi host name.
vm_nameYesVM to migrate.
to_datastoreNoTarget datastore (required for cross-storage hosts).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.12.10

TDQS

A4.6/5.0
Behavior5/5

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

The description adds significant behavioral detail beyond the annotations: without confirm it changes nothing, confirm=True applies the migration, and the agent must not set confirm on its own before the user has seen the preview. It also discloses refusal conditions and the noop case, which is exactly the kind of context an agent needs for safe invocation.

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

Conciseness4/5

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

The description is front-loaded with the primary action, then organized into preview behavior, refusal conditions, and return value. It is somewhat long, but each section provides actionable detail. The refusal list is dense but not redundant with the schema.

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

Completeness5/5

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

With no output schema, the description compensates by naming the return dictionary keys and describing the contents of blast_radius. It also covers edge cases like noop, cross-host shared storage requirements, and preconditions such as running cluster_info. This is sufficient for an agent to invoke the tool safely and interpret the result.

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

Parameters4/5

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

All five parameters already have schema descriptions, so the baseline is 3. The description adds meaningful semantics beyond the schema by tying confirm to the preview/apply lifecycle and explaining that to_datastore is required when vMotion would cross hosts without shared storage. This helps the agent choose parameter values correctly.

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 opens with a specific verb and resource: 'Migrate (vMotion) a VM to another host, optionally with storage vMotion.' This distinguishes it from sibling tools like vm_clone or vm_reconfigure. It also clarifies the preview/noop/migrated action states, so the tool's core behavior is unambiguous.

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?

It gives clear operational context: preview with confirm=False, apply with confirm=True, and the instruction to show the preview to the user before deciding. It also says to run cluster_info first for host names. It does not explicitly compare against alternatives such as vm_clone, but the migration-specific language makes the intended use clear.

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