Reserve Budget
cycles_reserveReserve budget for costly operations like LLM calls or tool invocations. Get a reservation ID to commit or release funds later, preventing overspending.
Instructions
Reserve budget before a costly operation (LLM call, tool invocation, external action). Returns a reservation_id to commit or release later. If decision is not ALLOW, do not proceed with the operation. For lightweight preflight checks without reserving, use cycles_decide instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttlMs | No | ||
| action | Yes | ||
| dryRun | No | ||
| subject | No | ||
| estimate | Yes | ||
| metadata | No | ||
| gracePeriodMs | No | ||
| overagePolicy | No | ||
| idempotencyKey | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caps | No | ||
| balances | No | ||
| decision | Yes | ||
| reserved | No | ||
| scopePath | No | ||
| reasonCode | No | ||
| expiresAtMs | No | ||
| retryAfterMs | No | ||
| reservationId | No | ||
| affectedScopes | Yes |