Get spend & budget
get_usageGet the account's AI spend and budget: how much has been spent this billing period, the plan's included credits, any budget cap, and whether new tasks are blocked (with the reason). Call this before a long series of prompts to check remaining budget, since dispatch fails once a spend ceiling is reached. Only agent runs stop: write_file, exec, start_app and deploy keep working, so the code can still be written and run by hand.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan | No | The account's plan. | |
| reason | No | Why tasks are blocked: budget_cap, credits_exhausted, or ai_disabled (agent tasks turned off for this account). | |
| blocked | Yes | Whether new tasks are refused right now. | |
| servers | No | Servers on the account. | |
| projects | No | Projects on the account. | |
| bonus_usd | No | Remaining one-time welcome credit, in USD. | |
| spend_usd | No | AI spend this billing period, in USD. | |
| budget_cap_usd | No | Your own budget cap, or null when none is set. | |
| hard_limit_usd | No | The lowest ceiling that blocks new tasks, or null. | |
| overage_allowed | No | Whether the plan allows billable spend past its credits. | |
| included_credits_usd | No | AI credits the plan includes, in USD. |