Skip to main content
Glama
CyberKnightLabs

vmware-knight

vm_guest_exec_output

Destructive

Execute shell commands inside a VM and capture stdout/stderr automatically. Preview the blast radius before running, then receive exit code, output, and OS family in the response.

Instructions

[WRITE] Execute a shell command inside a VM and capture stdout + stderr.

Automatically detects guest OS (Linux/Windows) and selects the correct shell. Output is captured by redirecting to a temp file, downloading it, then cleaning up — no manual redirection needed. Prefer this over vm_guest_exec whenever you need the output. Requires VMware Tools running and a writable temp directory in the guest.

Returns exit_code, stdout, stderr, timed_out, os_family, and blast_radius.

Without confirm=True this only previews: blast_radius names the VM (name, instance UUID), the guest account, the exact command and the shell it runs through, 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 unreadable identity or status, or a name that matches more than one VM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOptional vCenter/ESXi target name from config.
commandYesShell command (e.g. "df -h", "ls /etc", "ipconfig").
confirmNoFalse (default) returns the blast radius and changes nothing. True applies it.
timeoutNoMax wait seconds (default 300).
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.12.10

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the annotations: it explains the [WRITE] nature, the temp-file output capture and cleanup mechanism, the non-destructive preview when confirm=False, what blast_radius contains, and exactly when the tool refuses to run. Annotations already mark destructiveHint=true, and the description enriches this with concrete safety behavior without contradicting it.

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?

Although lengthy, the description is dense and well-structured: it leads with the core action and result, then mechanism, then selection guidance, then preview/refusal behavior. Every sentence adds operational or safety information that matters for invoking the tool correctly. No filler or redundancy.

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?

There is no output schema, so the description compensates by naming the return fields (exit_code, stdout, stderr, timed_out, os_family, blast_radius). It also covers prerequisites, preview contents, refusal conditions, and the approved workflow of showing the preview to the user. This is complete for a complex, potentially destructive tool.

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?

The input schema already covers all 7 parameters (100% coverage), so the baseline is 3. The description adds critical semantics beyond the schema, especially the confirm parameter: 'Without confirm=True this only previews... nothing runs' and the instruction not to set confirm=True on the agent's own initiative. This materially affects correct usage.

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 shell command inside a VM and capture stdout + stderr.' It clearly distinguishes itself from the sibling tool vm_guest_exec by emphasizing output capture and by explicitly naming vm_guest_exec as the alternative. This removes ambiguity at a glance.

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 selection guidance: 'Prefer this over vm_guest_exec whenever you need the output.' It also states prerequisites (VMware Tools running, writable temp directory) and refusal conditions (VM not powered on, Tools not running, ambiguous name). This is strong, actionable usage guidance.

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