Update Budget Mode
metrx_update_budget_modeChange an existing budget's enforcement mode (alert_only, soft_block, hard_block) or pause and resume it. Requires an admin-scope API key; blocking modes apply only to gateway-routed LLM calls.
Instructions
Change the enforcement mode of an existing budget, pause it, or ask to resume it. Use "alert_only" for monitoring, "soft_block" for overridable limits, or "hard_block" to block. "soft_block" and "hard_block" act only on LLM calls routed through the Metrx gateway (proxy); calls reported by the SDK or OpenTelemetry are never blocked. They are unavailable while the gateway's Cloudflare settings for budget sync are unset: the server then refuses them with 409 ENFORCEMENT_UNAVAILABLE and only "alert_only" works. Needs an API key with the 'admin' scope (an org owner or admin mints one in Settings → Security → API Keys); any other key is refused with 403 — then make the change at https://app.metrxbot.com/settings/budgets. Do NOT use to create new budgets — use set_budget for that. Requires an API key with the 'admin' scope.
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": {
"budget_id": "<budget_id>"
},
"name": "metrx_update_budget_mode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paused | No | true pauses the budget; false resumes it (refused while a hard_block budget is still at its limit for the period — raise the limit first) | |
| budget_id | Yes | The budget configuration ID to update | |
| enforcement_mode | No | New enforcement mode. soft_block/hard_block: gateway traffic only; 409 ENFORCEMENT_UNAVAILABLE while gateway enforcement is not configured |