Create Event
events_createAdds a metered-usage event to an app's usage catalog. Requires name
and key; key is what @the-meridian/sdk track({ eventKey: "<key>" })
reports against, must be lowercase letters, digits and underscores, is
unique per app across both events and usage views, and cannot be
changed afterwards. Optional unit, description, and default
metering terms (default_included_quantity, default_overage_rate,
default_overage_unit, default_capped_amount); omitted terms fall
back to 0 / 0 / 1 / 0. Per-plan overrides are set in the Meridian
dashboard. Call events_list first to avoid duplicating a key. Takes
the app_id returned by apps_list. Returns the same shape as one
events_list entry.
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": {
"app_id": "<app_id>",
"name": "<name>",
"key": "<key>"
},
"name": "events_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | App-local key the SDK reports usage against: lowercase letters, digits, underscores. Unique per app across events and usage views. Immutable. | |
| name | Yes | Display name for the event. | |
| unit | No | Optional unit label, for example "call" or "order". | |
| app_id | Yes | The app uuid returned by `apps_list`. | |
| description | No | Optional free-text description. | |
| organization_id | No | An organisation uuid or slug. When supplied, `app_id` is resolved within that organisation and may be a slug instead of a uuid, mirroring the Meridian web app. | |
| default_overage_rate | No | Default per-unit overage price (min 0, default 0). | |
| default_overage_unit | No | Default overage billing unit (min 1, default 1). | |
| default_capped_amount | No | Default overage cap per period (min 0, default 0). | |
| default_included_quantity | No | Default included quantity per period (min 0, default 0). |