Create a meter
create_meterCreate a meter once (POST /api/v1/meters). aggregation: sum (add up value, e.g. tokens), count (number of events, e.g. tool calls) or unique_count (distinct unique_value, e.g. active users). Re-creating an existing key returns meter_exists (harmless). Free plan: 3 meters. Needs your API key.
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": {
"key": "<key>",
"aggregation": "<aggregation>"
},
"name": "create_meter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | 1-64 chars of letters, digits, _ . - (e.g. agent_tool_calls). | |
| name | No | Optional display name (defaults to key). | |
| aggregation | Yes | ||
| stripe_event_name | No | Optional Stripe Billing Meter event_name for Stripe push (Pro/Ultra). |