Skip to main content
Glama
CyberKnightLabs

vmware-knight

vm_guest_exec

Destructive

Run a command inside a VM guest OS via VMware Tools. Without confirmation, previews the blast radius; with confirmation, returns exit code, stdout, stderr, and timeout status.

Instructions

[WRITE] Execute a command inside a VM via VMware Tools.

Requires VMware Tools running in the guest OS. Returns exit_code, stdout, stderr, timed_out, and blast_radius.

Without confirm=True this only previews: blast_radius names the VM (name, instance UUID), the guest account, the exact command, arguments and working directory, VMware Tools status and any blockers; nothing runs. Show it to the user. Do not set confirm=True on your own because the user asked earlier: they have not seen the preview yet. Refused outright: VM not powered on, VMware Tools not running, an identity or status that cannot be read, or a name that matches more than one VM.

Note: the Guest Ops API does not capture stdout/stderr directly, so use this only for fire-and-forget commands — prefer vm_guest_exec_output whenever you need the output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOptional vCenter/ESXi target name from config.
commandYesFull path to program (e.g. "/bin/bash", "C:\Windows\System32\cmd.exe").
confirmNoFalse (default) returns the blast radius and changes nothing. True applies it.
vm_nameYesTarget VM name.
passwordNoGuest OS password.
usernameYesGuest OS account to run as. Required — there is no default, so a call can never act as root without choosing root.
argumentsNoCommand arguments (e.g. "-c 'whoami'").
working_directoryNoWorking directory inside guest (optional).

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 goes well beyond the annotations by explaining the confirmation-gated preview behavior, required VMware Tools, what the blast_radius contains, refusal conditions, and the limitation that the Guest Ops API does not capture stdout/stderr directly. Since annotations only mark readOnlyHint=false and destructiveHint=true, the description carries the behavioral burden and does so thoroughly. No contradiction with annotations.

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 longer than average but every section earns its place: purpose, prerequisite, return fields, confirmation policy, refusals, and the alternative sibling. The [WRITE] tag and first line front-load the core purpose. It is slightly dense but well-structured.

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 returned fields (exit_code, stdout, stderr, timed_out, blast_radius), explaining behavior, listing refusal conditions, and naming the preferred sibling for output capture. The 8 parameters are all documented in the schema, so no critical gap remains for an agent to call this tool correctly.

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 description coverage is 100%, so the baseline is 3. The description adds context around the confirm parameter and blast_radius output, but most parameter-level meaning already exists in the schema. It does not materially deepen per-parameter semantics beyond what the schema provides.

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: 'Execute a command inside a VM via VMware Tools.' It also distinguishes itself from the sibling vm_guest_exec_output by explicitly noting this tool is for fire-and-forget commands. An agent can clearly understand what this tool does and how it differs from nearby alternatives.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: 'use this only for fire-and-forget commands — prefer vm_guest_exec_output whenever you need the output.' It also provides clear operational rules around confirm=True, saying not to set it on the agent's own initiative and to show the preview to the user. Refusal conditions are enumerated, leaving little to inference.

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