RequestRocketRequestRocketDocs
ControlMeters

Meters with an agent

Create meters on a proxy.

The registered meter tools create meters on a proxy or credential. Direct MCP server meters use the Core API.

Call get_guide with guide_key: "meter-creation" before the first create.

Call order

  1. Call create_proxy_meter.
    • Required by the runtime: clientId, proxyId, meterType, meterActive, limits. Use {} when no limit is needed.
    • Optional: extraction, meterMode, effect, methods, path, headers, query, body, token, variables, notes, alerts.
    • response_value requires extraction.
  2. Keep the returned meter sKey.
  3. Call get_meter_usage with clientId, proxyId, and meterId.

list_proxy_meters(clientId, proxyId) and get_proxy_meter(clientId, proxyId, meterId) inspect configuration. update_proxy_meter requires those three ids and accepts the optional meter fields. Credential equivalents are list_credential_meters, get_credential_meter, create_credential_meter, and update_credential_meter.

Example

{
  "tool": "create_proxy_meter",
  "arguments": {
    "clientId": "b3a1c7d2-5e44-4f0a-9c1e-7d2f8a6b1c90",
    "proxyId": "5d8a1c30-4e72-4b19-8f6a-0c3d9e7b1a25",
    "meterType": "response_value",
    "meterActive": true,
    "extraction": {
      "location": "body",
      "path": "usage.total_tokens",
      "defaultValue": 0
    },
    "limits": {
      "day": 100000
    }
  }
}

The meter adds the extracted token count to the current UTC day window. get_meter_usage returns current, limit, and windowKey.

Next

On this page