Skip to main content
Glama

run_command

Submits a legacy one-shot command on a Windows PC for Owner review and returns a pending_id for status tracking; use the wait API when you need the result.

Instructions

Legacy one-shot command submission. REVIEW returns pending_id. Prefer run_command_wait. interactive=True requires background=True and the DEV_ONLY numeric Python REPL allowlist.

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"
  }
}

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.
backgroundNoWhether to return immediately after launch; default false, unlike the wait API.
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.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field 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."
  2. First observedv0.1.2

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose lifecycle semantics: REVIEW yields a pending_id, TIMED_OUT carries launch_outcome=NOT_STARTED, and a SECOND_GUI reject retains ERROR/OwnerAuthorizationRequired rather than launching. What it never states is the obvious risk profile — that this executes an arbitrary binary with side effects on the Owner's machine and is not reversible — which is the single biggest omission for a no-annotation execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded correctly with purpose then the preferred alternative, and every sentence is operational rather than filler. However the second half is dense, cryptic shorthand ('Interactive SECOND_GUI Reject retains ERROR/OwnerAuthorizationRequired with launch_outcome=NOT_STARTED') that slows parsing and mixes outcome codes without defining them.

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 described, and the description instead covers the async/review lifecycle, timeout terminality, and the interactive gating. It delegates 'Owner review outcomes' to server instructions, which is acceptable for a shared policy but leaves this definition not fully self-contained.

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 coverage is 100%, so the baseline is 3, but the description adds a genuine cross-parameter constraint the schema cannot express: interactive=True is only valid when background=True, and only under a DEV_ONLY allowlist. That constraint materially changes how an agent fills the schema, which earns above baseline.

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?

Opens with a specific verb+resource: 'Legacy one-shot command submission', which tells an agent this launches a single command without waiting. It also explicitly contrasts with the sibling run_command_wait, so the tool is distinguishable. Tempered only by unexplained jargon (REVIEW, SECOND_GUI, launch_outcome) that assumes vocabulary from outside this description.

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

Usage Guidelines5/5

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

Gives explicit routing: 'Prefer run_command_wait', plus the hard precondition 'interactive=True requires background=True and the DEV_ONLY numeric Python REPL allowlist'. It also names the follow-up tools for the pending path (review_status/await_command_result) and states that PENDING is 'observer wait only', so the agent knows when to switch tools rather than poll this one.

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