ingestRawMetricEvent
ingestRawMetricEventIngest a usage event payload into a specified raw metric schema to record customer usage data, using the resource slug to identify the metric.
Instructions
Ingest a Usage Event for the specified resource slug. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rawMetricSlug | Yes | Slug of the Usage Event resource (raw metric), e.g. api_usage_events. | |
| event | No | Usage Event payload containing customer_id, timestamp, and a data map with schema-compliant types. customer_id and timestamp are mandatory event fields and must be provided in the payload; MCP does not auto-add them. Before constructing the event, fetch the schema via getRawMetricBySlug (or reuse the response from createRawMetric) so you only include fields that exist in the Usage Event schema (raw metric schema). Use the provided type buckets such as String/Int64 or the exact column names returned by sample logs; do not invent new keys. | |
| __userContext | No | Internal user context for multi-tenant authentication and approval workflow |