Lower key limits
set_limitLower an API key's period budget or per-minute send ceiling to cap a job before it runs or stand the key down after a mistake.
Instructions
Purpose: lower the period budget or the per-minute ceiling on a key of this account — cap a job before it runs, or stand a key down after a mistake. NOT for: raising either one. A value above what the key has now is refused with human_action_required: that is the account owner's decision, made in the console. An agent_budget_exceeded or rate_ceiling_exceeded refusal is not cured here — wait for the period, or ask a person. Returns: the key id and confirmation the new, lower limits are stored.
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": {
"api_key_id": "<api_key_id>",
"budget_per_period": "<budget_per_period>"
},
"name": "set_limit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key_id | Yes | The key whose limits to lower. | |
| idempotency_key | No | Your own key for this action. Retrying with the same key returns the first result instead of doing it twice — send one whenever a retry could double the effect. | |
| budget_per_period | Yes | Messages allowed per period. Must be at or below the key’s current budget; a key with no budget set can take any number, since every number is tighter than none. | |
| rate_ceiling_per_minute | No | Max sends per minute. Must be at or below the key’s current ceiling. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present instead of the fields above when the call was refused: code, message, fix, docs_url, retryable and, when waiting helps, retry_after_seconds. | |
| updated | No | ||
| api_key_id | No | Identifier. |