# Create sandbox

Tool: `veryfront__create_sandbox`

Create a sandbox. Requires project.sandboxes.manage.

## Arguments

| Name                | Type             | Required | Description                                                                                                                         |
| ------------------- | ---------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| `access_scope`      | string           | Yes      | Private sandboxes require creator credentials or a creator-owned MCP OAuth grant. One of `project`, `private`.                      |
| `project_reference` | string           |          | Project UUID or slug to bill. When set, the project owner is billed.                                                                |
| `environment_id`    | string · uuid    |          | Environment whose variables are copied once into the sandbox; it also identifies the billing project.                               |
| `ttl_mode`          | string           |          | Sandbox lifetime policy. `default` uses the platform’s idle and maximum lifetime limits. One of `default`, `duration`, `always_on`. |
| `ttl_hours`         | integer · max 24 |          | Required when ttl\_mode is duration. Number of hours before cleanup, up to 24.                                                      |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
curl -X POST -N "https://api.veryfront.com/mcp" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Accept: application/json, text/event-stream" \
  -H "Content-Type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "veryfront__create_sandbox",
    "arguments": {
      "access_scope": "project"
    }
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"id\":\"00000000-0000-0000-0000-000000000000\",\"short_id\":\"string\",\"endpoint\":\"string\",\"status\":\"pending\",\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"run_id\":\"00000000-0000-0000-0000-000000000000\",\"stopped_at\":\"string\",\"access_scope\":\"project\",\"workspace_storage\":\"ephemeral\",\"ttl_mode\":\"default\",\"ttl_hours\":1,\"expires_at\":\"string\",\"created_at\":\"string\",\"last_activity_at\":\"string\",\"variable_snapshot\":{\"source_environment_id\":\"00000000-0000-0000-0000-000000000000\",\"variable_count\":0,\"copied_at\":\"string\"}}"
      }
    ],
    "structuredContent": {
      "id": "00000000-0000-0000-0000-000000000000",
      "short_id": "string",
      "endpoint": "string",
      "status": "pending",
      "project_id": "00000000-0000-0000-0000-000000000000",
      "run_id": "00000000-0000-0000-0000-000000000000",
      "stopped_at": "string",
      "access_scope": "project",
      "workspace_storage": "ephemeral",
      "ttl_mode": "default",
      "ttl_hours": 1,
      "expires_at": "string",
      "created_at": "string",
      "last_activity_at": "string",
      "variable_snapshot": {
        "source_environment_id": "00000000-0000-0000-0000-000000000000",
        "variable_count": 0,
        "copied_at": "string"
      }
    }
  }
}
```
