check_memory
Before a heavy job, send how much memory the machine your agent runs on has free (free -m, os.freemem()) and what you are about to run. Get a memory warning and a verdict: run_local, or offload with the provider to use. Free watch-only logs would_offload for the weekly report; nothing runs.
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": {
"free_mb": "<free_mb>"
},
"name": "check_memory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | No | The command or a short description, e.g. "npm run build" or "playwright crawl of 40 pages". | |
| host | No | Optional name of the machine, e.g. "my-laptop". | |
| job_mb | No | Optional: your own estimate of the job's peak memory in MB. Without it we use a rough guess by job type. | |
| free_mb | Yes | Free or available memory right now, in MB (Linux: the "available" column of free -m). | |
| floor_mb | No | Keep at least this much free. Default 2048. | |
| total_mb | No |