Skip to main content

Quotas

MCP tools for the Quotas module. See the Quotas module docs for permissions and data model.

list-quotas

List quotas

Arguments

ArgumentTypeRequiredDescription
project_idstringnoProject ID (required if not using project key auth)
limitnumbernoMaximum number of results to return
offsetnumbernoNumber of results to skip

create-quota

Create a quota

Arguments

ArgumentTypeRequiredDescription
project_idstringnoProject ID (required if not using project key auth)
scopestringyesThe scope the quota applies to
scope_refstring | nullnoPublic id of the api key / agent / actor the quota applies to. For api_key and agent scope, NULL means all entities of that scope type in the project. For actor scope, NULL means one budget per actor — each end user gets their own allowance — rather than a pooled total across all actors.
metricstringyesThe metric being capped
windowstringyesThe window over which the metric is aggregated. current is the only accepted value for storage_bytes (a stored total is not aggregated over time) and is refused for every other metric.
limitnumberyesThe cap. Must be a positive integer for requests/tokens/storage_bytes (bytes); fractional values are allowed for cost_usd.
modestringnoenforce blocks with 429 (requests at the middleware, tokens/cost_usd at the pre-generation check); monitor observes without blocking — a breach fires the quota.exceeded webhook and writes a quotas:MonitorBreach audit entry, but the request is let through.
on_unpricedstringnoOnly for metric cost_usd (400 on any other metric). What an enforce quota does when the current window is a pricing blackout — several metered llm_tokens events, none of them priced, so the aggregate is 0 however much was actually spent. Platform meters such as compute_execution are read for the aggregate but never for this verdict. block (the default) refuses new generations with 409 QUOTA_UNENFORCEABLE until pricing is configured; allow accepts the unmeasurable spend explicitly. Either way a quota_unpriced exception is filed. monitor-mode quotas never block regardless. A partly priced window is not a blackout: no posture refuses it, it is enforced on its priced total, and it files the same exception.
meter_typestringnoOnly for metric cost_usd (400 on any other metric). The meter this cap answers for. Omit it and the cap sums every priced meter, which is the existing behaviour; name one and only that meter's cost counts, so an AI spend cap is not consumed by platform meters the operator prices (and vice versa). Part of the quota's identity, so two meter scopes can share a scope/metric/window and neither conflicts with an unscoped cap. Immutable after creation — replace the quota to change it.

get-quota

Get a quota

Arguments

ArgumentTypeRequiredDescription
quota_idstringyesQuota ID

update-quota

Update a quota

Arguments

ArgumentTypeRequiredDescription
quota_idstringyesQuota ID
limitnumbernoNew limit
modestringnoNew mode
on_unpricedstringnoNew pricing posture. Only for metric cost_usd (400 on any other metric); see the create operation for what block and allow mean.

delete-quota

Delete a quota

Arguments

ArgumentTypeRequiredDescription
quota_idstringyesQuota ID