Sandboxes
Create sandboxes to run commands and work with files in isolated environments. You can inspect command output, save snapshots, and manage session timeouts or network access.
Create a snapshot.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to snapshot. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Create a snapshot.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to snapshot. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Create a named sandbox.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | Yes | Request body for this tool. |
Create a named sandbox.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Create a named sandbox.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Create a directory.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to create the directory in. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Extend session timeout.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to extend the timeout for. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Get a named sandbox.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Name for the sandbox. Must be unique per project and URL-safe (alphanumeric, hyphens, underscores). |
projectId | string | No | The project ID or name (required when not using OIDC token). |
resume | boolean | No | Whether to automatically resume a stopped named sandbox by creating a new instance from its snapshot. Default: false. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Get a session.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to retrieve. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Get a command.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session containing the command. |
cmdId | string | Yes | The unique identifier of the command to retrieve. |
wait | string | No | If set to "true", the request will block until the command finishes execution. Useful for synchronously waiting for command completion. Allowed values: "true", "false". Default: "false". |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Stream command logs.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session containing the command. |
cmdId | string | Yes | The unique identifier of the command to stream logs for. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Get a snapshot.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
snapshotId | string | Yes | The unique identifier of the snapshot to retrieve. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Kill a command.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
cmdId | string | Yes | The unique identifier of the command to terminate. |
sessionId | string | Yes | The unique identifier of the session containing the command. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
List named sandboxes for a project. This tool corresponds to the listNamedSandboxes catalog operation. Use list_sessions to list Sandbox sessions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The unique identifier or name of the project to list named sandboxes for. |
limit | number | No | Maximum number of named sandboxes to return in the response. Used for pagination. Minimum: 1. Maximum: 50. Default: 20. |
sortBy | string | No | Field to sort by. Allowed values: "createdAt", "name", "statusUpdatedAt", "currentSnapshotId". Default: "createdAt". |
namePrefix | string | No | Filter named sandboxes whose name starts with this prefix. Only valid when sortBy=name. |
cursor | string | No | Opaque pagination cursor from a previous response. |
sortOrder | string | No | Sort direction. Allowed values: "asc", "desc". Default: "desc". |
status | string | No | Filter named sandboxes by status. Only valid when sortBy is createdAt. Allowed values: "running", "stopping", "stopped". |
tags | string | Array<string> | No | Filter sandboxes by tag. Format: "key:value". Only one tag filter is supported at a time. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
List commands.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to list commands for. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
List snapshots.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The unique identifier or name of the project to list snapshots for. |
name | string | No | Name for the sandbox. Must be unique per project and URL-safe (alphanumeric, hyphens, underscores). |
limit | number | No | Maximum number of snapshots to return in the response. Used for pagination. Minimum: 1. Maximum: 50. Default: 20. |
cursor | string | No | Opaque pagination cursor from a previous response. |
sortOrder | string | No | Sort direction for results by creation time. Allowed values: "asc", "desc". Default: "desc". |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
List sessions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | The unique identifier or name of the project to list sessions for. |
name | string | No | Filter sessions by sandbox name. Only sessions belonging to the specified sandbox are returned. |
limit | number | No | Maximum number of sessions to return in the response. Used for pagination. Minimum: 1. Maximum: 50. Default: 20. |
cursor | string | No | Opaque pagination cursor from a previous response. |
sortOrder | string | No | Sort direction for results by creation time. Allowed values: "asc", "desc". Default: "desc". |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
Read a file.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to read the file from. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | Yes | Request body for this tool. |
Execute a command.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session in which to execute the command. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Stop a session.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to stop. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | unknown | No | Request body for this tool. |
Update a sandbox.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The sandbox to update. |
projectId | string | No | The project ID that owns the named sandbox. When provided, takes precedence over OIDC project context. |
resume | boolean | No | Whether to automatically resume a stopped named sandbox by creating a new instance from its snapshot. Default: false. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Update network policy.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The unique identifier of the session to update the network policy for. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | object | No | Request body for this tool. |
Write files.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
xCwd | string | No | The target directory where the tarball contents will be extracted. If not specified, files are extracted to the sandbox home directory. |
sessionId | string | Yes | The unique identifier of the session to write files to. |
teamId | string | No | Team ID to use for this operation. |
slug | string | No | Team slug to use for this operation. Use instead of teamId. |
requestBody | string | Yes | A base64-encoded gzipped tarball to extract. Provide this binary value as a base64 string. |
Was this helpful?