Skip to main content
Glama
Zenskar MCP Server

Zenskar MCP Server

Official
by zenskar

ingestRawMetricEventsBulk

ingestRawMetricEventsBulk

Ingest multiple usage events for a resource slug in one bulk API call, ideal for CSV or batch imports that would otherwise require one request per event.

Instructions

Ingest MULTIPLE Usage Events for the specified resource slug in a single API call (bulk ingestion). Use this instead of calling ingestRawMetricEvent once per event — it sends one HTTP request carrying every event, which is far more efficient for CSV/batch imports. Each element of 'events' has the same shape as ingestRawMetricEvent's 'event' arg: customer_id, timestamp, and a data map with schema-compliant types. If importing from a CSV (or any source) whose column names don't clearly correspond to the expected fields (customer_id, timestamp, data.*), confirm the mapping with the user before constructing events — do not guess a mapping silently. Limit: 500 events per call — split larger batches into multiple calls. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling.

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": {
      "rawMetricSlug": "<rawMetricSlug>",
      "events": "<events>"
    },
    "name": "ingestRawMetricEventsBulk"
  }
}

Input Schema

NameRequiredDescriptionDefault
eventsYesArray of Usage Event payloads, each containing customer_id, timestamp, and a data map with schema-compliant types — same shape as ingestRawMetricEvent's 'event' arg, but plural. customer_id and timestamp are mandatory on EVERY event; MCP does not auto-add them. Events are validated server-side against the raw metric's real schema before anything is sent — an unknown data field or wrong type is rejected with the exact list of valid fields, so you do NOT need to pre-fetch the schema via getRawMetricBySlug first; only do so if you're unsure what fields/types this raw metric expects. Maximum 500 events per call — if you have more, split into multiple calls to this tool. Prefer 100–200 events per call: batches approaching 500 consume significant context, more so under stateless approval (the batch is base64-packed into the approval token and echoed back verbatim). Example event shape: {"customer_id": "example_customer", "timestamp": "2025-01-01 00:00:00", "data": {"String": "sample value", "Int64": 10, "Float64": 42.5}}.
__userContextNoInternal user context for multi-tenant authentication and approval workflow
rawMetricSlugYesSlug of the Usage Event resource (raw metric), e.g. api_usage_events.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.2

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the 500-event cap, the practical 100–200 recommendation and why (context consumption, base64-packed approval token), server-side schema validation that removes the need to pre-fetch via getRawMetricBySlug, and that host-level user confirmation is already enforced. These are behavioral traits an agent could not infer from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and the sibling alternative, then limits, then per-item shape, then the mapping caution. Sentences are dense but each carries decision-relevant information; there is minor overlap with the events schema description, which is acceptable reinforcement.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a bulk mutation with nested payloads, no annotations, and no output schema, the definition covers invocation, limits, validation behavior, and approval flow. The one gap is the response format — it does not say whether results are returned per event or aggregated, which matters for partial-failure handling in a 500-item batch.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it stresses that customer_id and timestamp are mandatory on EVERY event with no auto-fill, explains the per-element shape, and provides a concrete example event with typed data fields. It stops short of describing rawMetricSlug formatting beyond the schema's own example.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Ingest MULTIPLE Usage Events ... in a single API call (bulk ingestion)') and explicitly contrasts itself with the sibling singular tool ingestRawMetricEvent. An agent can distinguish the bulk path from the single-event path without opening either schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing guidance ('Use this instead of calling ingestRawMetricEvent once per event', suited to CSV/batch imports), a hard exclusion ('Limit: 500 events per call — split larger batches'), a pre-call caution about confirming CSV column mappings with the user, and a negative instruction not to re-confirm through the approval gate. When-to-use and when-not-to-use are both covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools