Skip to main content
Glama

vm_guest_exec

Execute commands inside a guest VM using VMware Tools. Returns exit code, stdout, stderr, and timeout indicator.

Instructions

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

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

Note: VMware Guest Ops API does not capture stdout/stderr directly. To capture output, redirect to a file and use vm_guest_download: command="/bin/bash", arguments="-c 'ls -la /tmp > /tmp/output.txt'" Then download /tmp/output.txt.

Args: vm_name: Target VM name. command: Full path to program (e.g. "/bin/bash", "C:\Windows\System32\cmd.exe"). arguments: Command arguments (e.g. "-c 'whoami'"). username: Guest OS username (default "root"). password: Guest OS password. working_directory: Working directory inside guest (optional). target: Optional vCenter/ESXi target name from config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vm_nameYes
commandYes
argumentsNo
usernameNoroot
passwordNo
working_directoryNo
targetNo
Behavior4/5

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

The description goes beyond annotations by explaining that the API does not capture stdout/stderr directly, requiring output redirection. It also lists return fields (exit_code, stdout, stderr, timed_out). Annotations indicate it is a write operation (readOnlyHint false) and not destructive (destructiveHint false), which aligns. The description adds valuable behavioral context.

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 well-structured: a one-line summary, a requirement, return values, a critical note with an example, and a bulleted Args list. It is front-loaded with important information. Slightly verbose in the note section but 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 7 parameters, no output schema, and write operation, the description covers prerequisites, return format, API limitation, and parameter explanations. It lacks details on error handling, security implications, or what happens if VMware Tools is missing. Still, it is sufficiently complete for most use cases.

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

Parameters5/5

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

With schema description coverage at 0%, the description fully compensates by explaining all 7 parameters: vm_name, command (full path), arguments, username (default root), password, working_directory, target. Examples are provided for command and arguments, making their meaning clear beyond the basic schema.

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 clearly states 'Execute a command inside a VM via VMware Tools,' a specific verb+resource. It distinguishes from sibling tools like vm_guest_download or vm_guest_exec_output by focusing on execution, and includes a [WRITE] label for clarity.

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 explicitly requires VMware Tools running in the guest OS and provides a workaround for the API limitation (redirect to file and use vm_guest_download). This gives clear context for when to use the tool and alternative steps. However, it does not explicitly state when not to use it, e.g., for simple command execution without output capture.

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/zw008/vmware-aiops'

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