Skip to main content
Glama

Run a command

rent_exec
Destructive

Runs a shell command (/bin/bash -l -c) in a running sandbox and answers when it exits: stdout, stderr, exit_code (null when killed by the timeout), timed_out. timeout_s defaults to 50, so the answer comes back inside common client tool timeouts. For work that runs longer (servers, builds, training), start it with rent_start_process and read its output with rent_get_process_output. Arguments not listed here go to the REST route as they are, which refuses them by name.

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": {
      "sandbox_id": "<sandbox_id>",
      "cmd": "<cmd>"
    },
    "name": "rent_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmdYesShell command.
cwdNo
envNo
userNoDefault `user`.
stdinNoWritten to stdin, then closed.
timeout_sNoSeconds before the command is killed. Default 50.
sandbox_idYesSandbox id (`lse_…`) from rent_create_sandbox or rent_list_sandboxes. It names the sandbox for its whole life and keeps answering rent_get_sandbox, with the final state, after it ends.

Output Schema

NameRequiredDescriptionDefault
stderrYes
stdoutYes
exit_codeYes
timed_outYes
duration_msYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover destructive/openWorld/non-idempotent, but the description adds substantive behavior beyond them: the exact shell invocation, the returned fields, that exit_code is null when the timeout kills the process, and that unrecognized arguments are rejected by name at the REST route. That last detail prevents a real failure mode not visible in annotations.

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?

Four sentences, each load-bearing: what it does, the timeout default and why, the alternative for long work, and the unknown-argument rule. Front-loaded with the core behavior and no filler.

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?

An output schema exists, yet the description still names the return fields and the null exit_code edge case, which is exactly the information an agent needs to branch on failure. Combined with the routing guidance and unknown-arg behavior, nothing material is missing for a 7-parameter destructive tool.

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 71%, so the schema carries most of the load, but the description adds meaning beyond it: the timeout_s default's purpose and the pass-through/refusal rule for unlisted arguments, which clarifies how additionalProperties={} actually behaves. cwd, env, user and stdin get no extra explanation in the description, keeping it short of a 5.

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?

States a specific verb and resource ('Runs a shell command (`/bin/bash -l -c`) in a running sandbox') and immediately pins down the completion semantics ('answers when it exits'). It distinguishes itself from rent_start_process / rent_get_process_output by name, so an agent can route without opening the sibling schemas.

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?

Explicit when-to-use boundary: this tool for synchronous commands, rent_start_process plus rent_get_process_output 'For work that runs longer (servers, builds, training)'. The 50s default rationale ('comes back inside common client tool timeouts') explains the tradeoff driving that choice.

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.

Resources