Check whether there is usage budget left
check_budgetChecks if your provider usage is below a set threshold so you can decide whether to start an expensive task now or postpone it until the limit resets.
Instructions
Checks if a provider is below a usage threshold, so you can decide whether to start a long or expensive task now or postpone it until the limit resets. Without window, checks every window and reports the tightest one. Returns ok, usedNow, resetsInSeconds and advice.
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": {
"provider": "<provider>"
},
"name": "check_budget"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| window | No | Limit window: "5h" (short window, the first) or "7d" (long window, the second). Labels like "1d" or "30d" also work. | |
| provider | Yes | Provider id, e.g. "claude" or "codex". | |
| max_percent | No | Budget threshold in percent (default 80). ok = usedNow < max_percent. |