Skip to main content
Glama

run_command_wait

Submits one command for local Owner GUI approval and returns bounded job output, with an optional async wait. Use wait_seconds=0 to observe status without blocking.

Instructions

Submit one command for local Owner GUI approval and bounded job output. interactive=True requires background=True and the DEV_ONLY numeric Python REPL allowlist. Use wait_seconds=0 for asynchronous observation.

Follow Owner review outcomes in server instructions. TIMED_OUT has launch_outcome=NOT_STARTED. On PENDING follow the same pending_id via review_status/await_command_result: PENDING is observer wait only. Interactive SECOND_GUI Reject retains ERROR/OwnerAuthorizationRequired with launch_outcome=NOT_STARTED; report and wait.

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": {
      "executable": "<executable>",
      "argv": "<argv>",
      "cwd": "<cwd>"
    },
    "name": "run_command_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesAbsolute working directory for the process within the local Owner policy.
argvYesExact string argument vector for one command; avoid credentials, scripts or private file content.
timeoutNoExecution timeout in seconds, 0.01 to 3600; default 5.
executableYesAbsolute path to the program binary; this is not a shell command string. TIMED_OUT (EXPIRED/CLOSED) is terminal: REPORT_AND_WAIT; never resubmit or ask for the window again. See tool help for outcome handling.
request_idNoOptional original request correlation ID (32 lowercase hex characters); NOT Owner permission.
interactiveNoDEV_ONLY opt-in stdin PIPE for an Owner-reviewed isolated Python numeric REPL; default false. Requires background or asynchronous invocation.
output_limitNoMaximum captured output bytes, 128 to 65536; default 8192.
wait_secondsNoBounded observer wait in seconds, 0 to 90; default 50. PENDING means observation is incomplete; continue the SAME pending_id with the existing status/wait tool.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.7
    • changedInput schema / properties / executable / description
      Previous value: -"Absolute path to the program binary; this is not a shell command string."New value: +"Absolute path to the program binary; this is not a shell command string. TIMED_OUT (EXPIRED/CLOSED) is terminal: REPORT_AND_WAIT; never resubmit or ask for the window again. See tool help for outcome handling."
    • changedInput schema / properties / wait_seconds / description
      Previous value: -"Seconds to await Owner click and original job, 0 to 90; default 50. On timeout use await_command_result, not run_command_wait again."New value: +"Bounded observer wait in seconds, 0 to 90; default 50. PENDING means observation is incomplete; continue the SAME pending_id with the existing status/wait tool."
  2. First observedv0.1.2

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 burden, and it does disclose useful outcome semantics: TIMED_OUT is terminal with launch_outcome=NOT_STARTED and must not be resubmitted, PENDING is observer-wait only, and Reject retains ERROR/OwnerAuthorizationRequired. However, it defers the actual review outcomes to "server instructions," and it states interactive=True requires background=True even though no background parameter exists in the schema — a reference that will confuse an agent.

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?

Wait, re-evaluating: the text is compact and front-loads the core purpose before the outcome rules, with no filler sentences. Shorthand tokens (TIMED_OUT, PENDING, REPORT_AND_WAIT, SECOND_GUI) are used without definition, which costs some readability but not length.

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?

An output schema exists, so return values need not be described, and the approval lifecycle is partially covered. For a complex eight-parameter, Owner-gated submission tool with no annotations, the description still offloads the decisive outcome-handling rules to server instructions and contains the phantom background parameter, leaving the agent to resolve gaps elsewhere.

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 100%, so the schema already documents all eight parameters including ranges and defaults, which sets the baseline at 3. The description adds only a little beyond it: the meaning of wait_seconds=0 and the coupling of interactive to background. The undefined "background" reference actually detracts from parameter clarity rather than adding to it.

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?

"Submit one command for local Owner GUI approval and bounded job output" gives a specific verb (submit) and resource (one command) plus the submission mechanics. It distinguishes itself from run_command by emphasizing the approval-and-wait framing and by naming review_status/await_command_result for the PENDING path. The density of internal jargon (Owner GUI, DEV_ONLY allowlist, SECOND_GUI) keeps it short of fully self-explanatory.

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?

Gives concrete routing rules: wait_seconds=0 for asynchronous observation, interactive=True only with background plus the DEV_ONLY allowlist, and on PENDING continue with the same pending_id via review_status/await_command_result. It lacks an explicit statement of when to prefer plain run_command over this tool, but the alternative-handling guidance for the pending state is clearly present.

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