metering__record_usage
Record usage events with idempotent event_id to avoid double billing and track outcome for SLA reports.
Instructions
[metering — usage metering + SLA accounting (x402 meter)] Record a usage event. Idempotent on event_id (safe to retry — never double-billed). outcome is 'ok' or 'error' and feeds the SLA report.
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": {
"meter_id": "<meter_id>",
"event_id": "<event_id>",
"quantity": "<quantity>"
},
"name": "metering__record_usage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outcome | No | ok | |
| event_id | Yes | ||
| metadata | No | ||
| meter_id | Yes | ||
| quantity | Yes |