Stats Tool

The get_sandbox_stats tool returns real-time CPU and memory statistics for one or all monitored sandboxes.

Parameters

ParameterTypeDefaultDescription
sandbox_idstringoptionalSpecific sandbox; omit for all

Output Format

[
  {
    "sandbox_id": "standalone-postgres",
    "block_name": "postgres",
    "cpu_percent": 1.2,
    "memory_bytes": 52428800,
    "memory_display": "50 MB",
    "pid": 12345,
    "timestamp": 1712577600
  }
]

When sandbox_id is provided but not found in the stats cache, the tool returns a tool-level error with is_error: true.