Skip to main content
Glama

Run PowerShell in sandbox

box_exec
Destructive

Run PowerShell commands inside an active Windows sandbox and receive structured exit, stdout, stderr, timeout, and timing results.

Instructions

Run a PowerShell command inside the running sandbox and wait for it. Returns JSON with exit, stdout, stderr, timed_out and ms. Side effects are whatever the command does, confined to the sandbox (it can reach the internet if network='on'). Requires box_start first. Use box_trial for a full copy-run-diff cycle.

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": {
      "command": "<command>"
    },
    "name": "box_exec"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesPowerShell script text, e.g. 'Get-ChildItem C:\winbox\in'.
timeout_sNoSeconds before the command is killed (the call gives up after timeout_s + 60).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructive, openWorld and non-idempotent, but the description adds real context beyond them: the call is synchronous, side effects are confined to the sandbox, and network reachability depends on a sandbox setting. Minor ambiguity: 'network="on"' is not a parameter of this tool, so the agent may briefly look for it here rather than on box_start.

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?

Three sentences with no waste: purpose and blocking semantics first, return shape second, constraints and the sibling alternative last. Every clause carries information an agent needs.

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?

No output schema exists, and the description compensates by enumerating the return fields (exit, stdout, stderr, timed_out, ms). Combined with the prerequisite, timeout behavior and sandbox confinement note, nothing essential is missing for a 2-parameter tool.

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 coverage is 100%, with both command and timeout_s fully documented including the +60s client grace period. The description adds no parameter detail beyond what the schema already states, so the baseline of 3 applies.

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 ('Run a PowerShell command inside the running sandbox') and adds the key semantic that it blocks ('wait for it') and returns structured results. It is immediately distinguishable from siblings like box_start and box_trial.

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 an explicit prerequisite ('Requires box_start first') and routes to the alternative with a condition ('Use box_trial for a full copy-run-diff cycle'). The agent knows both when this applies and where to go instead.

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