Skip to main content
Glama

run_script_in_guest

Execute inline scripts inside a VMware guest OS, with optional timeout and no-wait support; redirect output to a guest file for later retrieval when full stdout capture is needed.

Instructions

Execute inline script text inside the guest OS (runScriptInGuest).

Note: vmrun itself does not stream guest stdout back to the host; redirect output to a file inside the guest and retrieve it with copy_file_guest_to_host if you need full stdout capture.

Args: vm: VM name, substring, or full .vmx path. interpreter: Interpreter absolute path in guest (e.g. '/bin/bash' or 'C:\Windows\System32\cmd.exe'). script_text: Script body to execute. guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses). no_wait: Return immediately without waiting for completion. timeout: Subprocess timeout in seconds.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "vm": "<vm>",
      "interpreter": "<interpreter>",
      "script_text": "<script_text>"
    },
    "name": "run_script_in_guest"
  }
}

Input Schema

NameRequiredDescriptionDefault
vmYes
no_waitNo
timeoutNo
guest_userNo
interpreterYes
script_textYes
guest_passwordNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does add real behavioral facts: vmrun does not stream guest stdout back to the host, and guest_password is masked in logs/responses. What it omits is safety-relevant: executing an arbitrary script in a guest is a potentially destructive write operation, and neither that nor its reversibility or required guest prerequisites are disclosed.

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?

The action sentence is front-loaded, the behavioral caveat follows immediately, and the Args block is the right structure for seven parameters. No sentence is filler; even the parenthetical `runScriptInGuest` anchor earns its place by tying the tool to the vmrun primitive.

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?

An output schema exists, so return values need not be explained, and the description correctly focuses on invocation and the stdout-capture caveat. It is nearly complete for a mutating guest-execution tool; the only real gap is the absence of safety framing and credential/prerequisite expectations.

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?

Schema description coverage is 0%, so the Args block is doing all the work, and it nearly succeeds. It explains that `vm` accepts a name, substring, or full .vmx path, gives concrete interpreter examples for both platforms, and clarifies `no_wait` and `timeout`. It only leaves the numeric default behavior for `timeout` and the empty-string semantics of guest credentials implicit.

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

Purpose4/5

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

States a specific verb and resource: 'Execute inline script text inside the guest OS', plus the underlying vmrun primitive `runScriptInGuest`. It is clear what the tool does, but it never distinguishes itself from the sibling `run_command_in_guest`, so an agent must guess which of the two guest-execution tools applies.

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

Usage Guidelines3/5

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

The note gives conditional guidance for the output-retrieval path: redirect to a file in the guest and use `copy_file_guest_to_host` if full stdout is needed. That is genuinely useful routing. However, there is no guidance on when to choose this over `run_command_in_guest`, no prerequisites (VMware Tools, credentials), and no statement of what this tool is unsuitable for.

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