Skip to main content
Glama

metering__record_usage

Record usage events with idempotent event_id to avoid double billing and track outcome for SLA reports.

Instructions

[metering — usage metering + SLA accounting (x402 meter)] Record a usage event. Idempotent on event_id (safe to retry — never double-billed). outcome is 'ok' or 'error' and feeds the SLA report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outcomeNook
event_idYes
metadataNo
meter_idYes
quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.12
  2. Removedv0.1.11
  3. Changed9 schema fields changedv0.1.9
    • removedInput schema / properties / event_id / title
      Removed value: -"Event Id"
    • removedInput schema / properties / metadata / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / metadata / default
      Removed value: -null
    • removedInput schema / properties / metadata / title
      Removed value: -"Metadata"
    • addedInput schema / properties / metadata / type
      Added value: +"object"
    • removedInput schema / properties / meter_id / title
      Removed value: -"Meter Id"
    • removedInput schema / properties / outcome / title
      Removed value: -"Outcome"
    • removedInput schema / properties / quantity / title
      Removed value: -"Quantity"
    • removedInput schema / title
      Removed value: -"record_usageArguments"
  4. Changed9 schema fields changed
    • addedInput schema / properties / event_id / title
      Added value: +"Event Id"
    • addedInput schema / properties / metadata / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / metadata / default
      Added value: +null
    • addedInput schema / properties / metadata / title
      Added value: +"Metadata"
    • removedInput schema / properties / metadata / type
      Removed value: -"object"
    • addedInput schema / properties / meter_id / title
      Added value: +"Meter Id"
    • addedInput schema / properties / outcome / title
      Added value: +"Outcome"
    • addedInput schema / properties / quantity / title
      Added value: +"Quantity"
    • addedInput schema / title
      Added value: +"record_usageArguments"
  5. Changed9 schema fields changed
    • removedInput schema / properties / event_id / title
      Removed value: -"Event Id"
    • removedInput schema / properties / metadata / anyOf
      Removed value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / metadata / default
      Removed value: -null
    • removedInput schema / properties / metadata / title
      Removed value: -"Metadata"
    • addedInput schema / properties / metadata / type
      Added value: +"object"
    • removedInput schema / properties / meter_id / title
      Removed value: -"Meter Id"
    • removedInput schema / properties / outcome / title
      Removed value: -"Outcome"
    • removedInput schema / properties / quantity / title
      Removed value: -"Quantity"
    • removedInput schema / title
      Removed value: -"record_usageArguments"
  6. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Discloses idempotency and billing guarantee, but no annotations exist; the description does not cover error behavior, permissions, or other side effects beyond what is stated.

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?

Two sentences, front-loaded with context tag, no fluff. Every word adds value.

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

Completeness2/5

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

With 5 parameters, 3 required, no output schema, and low schema coverage, the description leaves significant gaps in parameter meaning and return expectations.

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 coverage is 0%; description adds meaning for event_id (idempotency key) and outcome ('ok'/'error' feeds SLA), but does not explain quantity, metadata, or meter_id.

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?

Description starts with a clear context tag and states the verb 'Record' and resource 'usage event', distinguishing it from sibling tools like metering__list_events and metering__usage_summary.

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

Usage Guidelines4/5

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

Explicitly states idempotency on event_id, indicating safe retry and no double billing. Provides context for outcome parameter feeding SLA report, but does not mention when not to use or alternatives.

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