Skip to main content
Glama

Record usage

record_usage

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": "record_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
outcomeNook
event_idYes
metadataNo
meter_idYes
quantityYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.7/5.0
Behavior1/5

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

The description states the operation is "Idempotent on event_id (safe to retry — never double-billed)", while the supplied annotations declare idempotentHint=false. That is a direct conflict on the single most operationally important behavior of a billing tool, so an agent cannot trust either signal. This is flagged as an annotation contradiction regardless of the otherwise useful detail about outcome feeding the SLA report.

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?

Three short sentences with no filler; the operation, the retry-safety property and the outcome semantics are each front-loaded and earn their place. Nothing is repeated from the schema or annotations.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the description covers idempotency and outcome meaning. For a non-destructive write tool with five parameters at 0% schema coverage, however, it omits what happens with an unknown meter_id, how quantity is interpreted, and what metadata is used for.

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

Parameters2/5

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

Schema description coverage is 0%, so the description carries the full burden, and it only explains two of the five parameters: event_id as the idempotency key and outcome as 'ok'/'error' feeding the SLA report. meter_id, quantity (including units and whether negatives/zero are valid) and metadata remain undocumented in both the schema and the description.

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

Purpose4/5

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

The description opens with a specific verb and resource ("Record a usage event"), which cleanly separates it from list_events, usage_summary, sla_report and the meter CRUD siblings. It does not name a sibling or state scope boundaries explicitly, so it lands at clear-but-undifferentiated.

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

Usage Guidelines2/5

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

There is no guidance on when to call this versus alternatives such as list_events or usage_summary, and no preconditions (e.g., meter must exist). Usage is only implied by the tool's name and the phrase "Record a usage event", with no exclusions or routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.