Skip to main content
Glama

sandbox_exec_background

Execute shell commands and start long-running processes like dev servers or file watchers in an E2B sandbox environment. The command runs immediately in the background without waiting for it to complete, enabling non-blocking operations in isolated cloud sandboxes.

Instructions

Start a background process in a sandbox (e.g., dev server, file watcher). Returns immediately without waiting for completion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sandboxIdYesThe sandbox ID to run the command in.
commandYesThe shell command to run in the background.
cwdNoWorking directory. Defaults to /home/user.
envsNoEnvironment variables for this command.
Behavior3/5

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

The description explicitly states the key non-blocking behavior and gives example use cases. However, with no annotations provided, the description carries full burden. It does not disclose whether the process output can be retrieved later, how to manage the background process (e.g., via process list/kill tools), or what happens if the sandbox is stopped. This leaves gaps for a background 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.

Conciseness4/5

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

The description is concise (one sentence with an example) and front-loaded with the key behavior. It avoids unnecessary words. However, it could be slightly more structured by separating the use case from the return behavior. Overall, it is efficient and earns a 4.

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?

Given the complexity (background execution, sandbox, multiple parameters) and the absence of output schema or annotations, the description is minimally adequate. It explains the core async behavior but lacks details on lifecycle management, error cases, and how to retrieve results. Sibling tools like sandbox_process_list and sandbox_process_kill provide complementary functionality, but the description does not mention them.

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%, so the schema documents all parameters adequately. The description adds no additional semantics beyond the schema, but the schema already provides clear descriptions for each field (e.g., sandboxId, command). The description mentions 'sandbox' and 'command' implicitly, but does not add new meaning. Baseline 3 is appropriate.

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?

The description clearly states the verb 'Start' and the resource 'a background process in a sandbox', with concrete examples ('dev server, file watcher'). It is distinct from sibling tools like sandbox_exec (which likely blocks) and effectively communicates its purpose.

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

Usage Guidelines3/5

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

The description implies this tool is for long-running processes by stating 'Returns immediately without waiting for completion', but does not explicitly contrast with sandbox_exec or other alternatives. It provides no guidance on when not to use it, such as for commands that need output. The sibling context suggests sandbox_exec as an alternative, but the description does not mention it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/asif-nvc/e2b-sandbox-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server