Skip to main content
Glama

Run a command

vm_exec

Run a command. Runs one command in a running VM as its user, with /bin/sh -lc, and answers its exit code and output. It opens no terminal. Use ?stream=1 for commands that run longer than about 90 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": {
      "vmId": "<vmId>",
      "command": "<command>"
    },
    "name": "vm_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNo
envNo
vmIdYes
streamNo
commandYes
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only give the safety flags (readOnlyHint false, destructiveHint false, idempotentHint false); the description adds real behavioral context beyond them — execution identity (the VM's user), the shell wrapper, the returned artifacts (exit code and output), and the absence of a terminal. The only shortfall is it does not discuss the interaction between the default 60s timeoutMs and the ~90s streaming threshold.

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?

Four short sentences, front-loaded with the action and mechanism before the streaming caveat; nothing is padded. The lead sentence 'Run a command.' largely restates the title, a minor waste.

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

Completeness3/5

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

For an arbitrary-command execution tool with no output schema and 0% parameter coverage this is on the thin side. It does cover the return shape at a high level ('exit code and output'), but leaves cwd/env/timeout semantics and the default-timeout-vs-streaming relationship unexplained.

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 0%, so the description must carry all six parameters. It explains `command` (single command via `/bin/sh -lc`), implies `vmId` ('in a running VM'), and explains `stream` with the `?stream=1` form, but says nothing about `cwd`, `env`, or `timeoutMs`, leaving half the surface undocumented.

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 ('Runs one command in a running VM as its user') and pins the execution mechanism (`/bin/sh -lc`), which is enough to tell it apart from sandbox_exec on the VM-vs-sandbox axis. It does not name any sibling explicitly, so differentiation is inferred rather than declared.

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?

Gives one concrete routing rule: use `?stream=1` for commands running longer than about 90 seconds. It also implies the non-interactive case ('It opens no terminal'), but offers no guidance on when to choose this over sandbox_exec or vm_get, and no prerequisites such as the VM needing to be awake.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.