Skip to main content
Glama

Prompt Sandbox

prompt_agent

Submit a natural-language task to a sandboxed agent harness, starting a new conversation, continuing a specific one, or resuming the most recent; monitor progress with events.

Instructions

Prompt Sandbox. Queue a natural-language work item for an agent harness (Codex, Claude Code, pi, OpenCode, or Prime Agent) inside the sandbox. Observe progress with GET /sandboxes/{sandboxId}/events.

A Sandbox runs many conversations in parallel. Set new: true to start a fresh one, conversationId to continue a specific one, or omit both to continue the most-recently-active conversation; the response returns the conversationId. See Integrated agents.

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": {
      "sandboxId": "<sandboxId>",
      "provider": "<provider>",
      "prompt": "<prompt>"
    },
    "name": "prompt_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
newNoStart a NEW conversation on the sandbox (runs in parallel with any existing ones) instead of continuing the most-recently-active one. Mutually exclusive with `conversationId`.
fastNoOptional. `true` runs this prompt in fast mode. The model stays the same and gives output faster. The provider bills fast mode at its higher fast rate. Omit to use the choice saved on the Agents dashboard for that model. `false` forces standard speed. Only models with `fastMode` set to `true` in `GET /provider-models` accept `true`. Other models return 400 `fast_mode_not_supported`.
modelNoOptional provider model id from `GET /provider-models`. Omit to use the model selected for that harness on the Agents dashboard. Unknown explicit ids are currently forwarded rather than rejected by request validation.
speedNoOptional. Same as `fast`, plus `ultrafast`, the fastest Codex tier, billed above fast. Only models with `ultrafastMode` set to `true` in `GET /provider-models` accept `ultrafast`. Other models return 400 `ultrafast_not_supported`. Ultrafast needs ChatGPT Pro, an Enterprise or Edu workspace with Ultrafast turned on, or an API organization with Ultrafast access. Without it, the prompt fails and says so. When you send both `speed` and `fast`, they must agree, or the request returns 400 `invalid_speed`.
promptYesNatural-language task for the sandbox, including repo, preview, or browser-use instructions.
providerYes
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.
conversationIdNoContinue a specific conversation by id (as returned by a previous prompt). Omit (and omit `new`) to continue the sandbox's most-recently-active conversation.
reasoningEffortNoOptional reasoning/thinking level (e.g. `none`, `low`, `medium`, `high`, `xhigh`, `max`). Which levels a given model accepts is listed per model in `GET /provider-models`; some models accept none.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false and destructiveHint=false. The description adds genuinely useful behavior beyond them: the work is queued asynchronously, a sandbox runs many conversations in parallel, progress is polled via the events endpoint, and the response returns a `conversationId` (important since there is no output schema). It does not say whether repeated identical prompts create duplicate work, but the annotation gap is largely covered.

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

Conciseness4/5

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

Two short paragraphs, front-loaded with the purpose and then the conversation-targeting rule. The only waste is mild duplication of the `new`/`conversationId` semantics already spelled out in the schema.

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?

For a 9-parameter asynchronous tool with no output schema, the description covers the essential unknowns: that work is queued rather than returning a result, how to pick a conversation, and where to read results. Remaining gaps (failure modes, whether the call blocks, expected latency) are secondary given the schema's detailed error and billing notes.

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 89%, so the schema already carries most parameter meaning. The description restates the `new`/`conversationId`/omit-both rule and notes the response returns the chosen `conversationId`, but adds nothing about `provider` (a 10-value enum), `prompt` content expectations, or `model` validation beyond what the schema says. Baseline 3 is appropriate.

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?

States a concrete verb and object: 'Queue a natural-language work item for an agent harness ... inside the sandbox,' and names the harnesses it supports. An agent can tell this submits work rather than interrupting or steering it, but the description never names the sibling operations (interrupt_agent, steer_agent, get_prompt_status) that a caller would choose between.

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 explicit decision rules for the three conversation-targeting modes: `new: true` for a fresh parallel conversation, `conversationId` to continue one, or omit both for the most-recently-active one. It also routes the caller to `GET /sandboxes/{sandboxId}/events` to observe progress, but offers no when-not guidance or comparison against the interrupt/steer siblings.

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