RequestRocketRequestRocketDocs
ControlLimits

Meter limits with an agent

Read the current meter windows.

Windows are fixed UTC calendar periods stored in the meter's limits object. A caller blocked by a reached limit receives 429 and Retry-After until the latest exceeded window resets.

Call get_guide with guide_key: "meter-creation" before creating a limited meter.

Call order

  1. Create or update a proxy meter with limits: { minute?, hour?, day?, month? }.
  2. Call get_meter_usage with required clientId, proxyId, and meterId.
  3. Compare each returned current value with its limit.

get_proxy_meter(clientId, proxyId, meterId) returns the configured limits. update_proxy_meter requires those ids; limits is optional and replaces the whole limits object when supplied.

Example

{
  "tool": "get_meter_usage",
  "arguments": {
    "clientId": "b3a1c7d2-5e44-4f0a-9c1e-7d2f8a6b1c90",
    "proxyId": "5d8a1c30-4e72-4b19-8f6a-0c3d9e7b1a25",
    "meterId": "4b7c2e95-1a60-4d38-9f2b-8c5e0a3d7b16"
  }
}

The result contains usage.<window>.current, limit, and a UTC windowKey.

Next

On this page