Skip to main content
Glama

Run a guest command

relay_exec

Run one guest command in a disposable VM while automatically capturing before/after snapshots as recorded evidence. Supports optional step metadata, reason, timeout, and diagnostic mode for repairs.

Instructions

Run one guest command (argv) as one recorded operation; never hide several interactions in one call. Evidence is automatic: the relay snapshots the display before and after and records a step derived from the command. Optional reason (intent, never authorization), step (id, title, expected, inputMode) and snapshots.afterIntervalMs (default 500 ms) enrich or tune the record; consecutive keystrokes may form an explicit text group with snapshots.group (first/member/last). timeoutMs bounds execution (default 120000, up to 3600000). The result carries the outcome, bounded stdout/stderr and the after-snapshot inline. A refused, uncertain or nonzero result keeps the VM; never replay input whose effect is uncertain. diagnostic: true records a diagnosis or repair without snapshots, even before relay_stage; it is never visual verification, and its result has one output field with stdout and stderr combined.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argvYes
stepNoOptional step record overrides; any field left out is derived from the call.
reasonNoOptional intent, retained as evidence. Default: derived from the call.
snapshotsNoOptional. Consecutive keystrokes may form an explicit text group (first/member/last); only first gets a before-snapshot and only last an after-snapshot.
timeoutMsNoExecution timeout in milliseconds, default 120000, maximum 3600000. Independent of snapshot delay and lease TTL.
diagnosticNoExplicit command diagnosis or repair without screenshot evidence, including before staging. Commands and outcomes remain recorded. Never claim visual verification.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A4.8/5.0
Behavior5/5

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

The description discloses many non-obvious behaviors beyond annotations: automatic before/after display snapshots, derived step recording, bounded stdout/stderr in results, VM retention on refused/uncertain/nonzero results, and the diagnostic mode's different snapshot/output behavior. This is exactly the kind of context annotations cannot convey.

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 description is dense but every sentence earns its place. It front-loads the core operation, then clusters optional parameters and safety/behavioral notes without fluff. Long paragraphs are justified by the tool's complexity and the high-value details they convey.

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?

Given the complex nested schema and no output schema, the description compensates fully: it explains result contents, snapshot grouping behavior, timeout bounds, diagnostic mode semantics, and safety guarantees. An agent has enough to invoke the tool correctly and interpret its return value.

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?

Even with 83% schema coverage, the description adds meaning beyond the schema: `reason` is intent and 'never authorization', snapshots.group is for consecutive keystrokes with explicit first/member/last phases, afterIntervalMs defaults to 500 ms, and diagnostic output is a single combined `output` field. These clarifications help an agent tune calls correctly.

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: 'Run one guest command (`argv`) as one recorded operation'. It also adds a crucial scoping rule, 'never hide several interactions in one call', which distinguishes this executor from bulk or multi-step siblings. The title reinforces the same message, so an agent can select it confidently.

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?

The description gives clear usage context: it is for single guest commands, evidence is recorded automatically, and `diagnostic: true` is for diagnosis/repair even before relay_stage. It also warns not to replay input whose effect is uncertain. It does not explicitly name sibling tools for comparison, but the guidance is sufficient for correct invocation.

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