Skip to main content
Glama

Run a guest script

relay_script

Run a guest script file in a staged VM, auto-recording evidence for a single operation. Provide host path and language (JavaScript, TypeScript, Python); supports step, reason, snapshots, timeout.

Instructions

Run one guest script file as this call's single recorded operation. Evidence is automatic, as for relay_exec, whose optional reason, step, snapshots and timeoutMs it shares. Requires localPath (a host file path) and language (javascript, typescript or python); it runs under the staged workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepNoOptional step record overrides; any field left out is derived from the call.
reasonNoOptional intent, retained as evidence. Default: derived from the call.
languageYes
localPathYes
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

A3.6/5.0
Behavior3/5

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

The description adds meaningful context beyond the annotations: evidence is automatic, this is a single recorded operation, and execution happens under the staged workspace. It does not contradict the annotations. However, for a tool that executes arbitrary guest scripts, it does not disclose potential side effects, sandboxing limits, or what happens on failure, leaving the agent to infer behavioral risk beyond the basic openWorldHint and readOnlyHint flags.

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 two sentences with no filler. It front-loads the core purpose ('Run one guest script file'), then packs the essential constraints and cross-reference to relay_exec into the second sentence. Every clause contributes useful information.

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 a tool with no output schema, the description is missing a critical piece: what the caller receives after execution (stdout, exit code, recorded evidence reference, error behavior). It covers invocation inputs, shared optional parameters, and workspace context, but an agent cannot fully predict how to consume the result. The nested snapshots and step objects are explained by the schema, so the biggest gap is the unspecified return/result semantics.

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 description adds meaning for the two required parameters that the schema leaves undocumented: localPath is 'a host file path' and language is restricted to 'javascript', 'typescript' or 'python'. Since schema coverage is 67%, the description compensates for the biggest gap. It does not need to re-explain step, reason, snapshots, and timeoutMs because those already have descriptions in the schema.

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?

The description states a specific verb and resource: 'Run one guest script file as this call's single recorded operation.' It adds useful scope by calling out that this is a single recorded operation, which separates it from broader multi-step tools. However, it does not explicitly contrast it with sibling tools like relay_exec, relay_code, or relay_run, instead only referencing relay_exec for shared optional parameter semantics.

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 description implies the primary use case: run a guest script file under the staged workspace. It also states required inputs (localPath and language), which gives the agent a baseline for when the tool is applicable. But it never explicitly says when to prefer this tool over relay_exec, relay_code, or relay_run, nor does it provide exclusions or alternative routing guidance.

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