Skip to main content
Glama

Create a meter

create_meter
Idempotent

Create a meter once (POST /api/v1/meters). aggregation: sum (add up value, e.g. tokens), count (number of events, e.g. tool calls) or unique_count (distinct unique_value, e.g. active users). Re-creating an existing key returns meter_exists (harmless). Free plan: 3 meters. Needs your API key.

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": {
      "key": "<key>",
      "aggregation": "<aggregation>"
    },
    "name": "create_meter"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes1-64 chars of letters, digits, _ . - (e.g. agent_tool_calls).
nameNoOptional display name (defaults to key).
aggregationYes
stripe_event_nameNoOptional Stripe Billing Meter event_name for Stripe push (Pro/Ultra).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, and the description usefully confirms what that means in practice (re-create returns meter_exists rather than erroring). It also adds quota context (free plan: 3 meters) and an auth requirement (needs your API key), which annotations do not carry, though it says nothing about what is returned on success.

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

Conciseness4/5

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

Front-loads the core action and endpoint, then packs aggregation semantics, idempotency behavior, quota, and auth into a few dense sentences with no filler. The telegraphic style ("Free plan: 3 meters. Needs your API key.") is efficient but slightly clipped.

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?

For a 4-parameter creation tool with no output schema, the description covers creation semantics, idempotency, quota, and auth well, but omits any indication of the returned object or what happens when the free-plan limit is exceeded.

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 75%, so the baseline is 3, but the description genuinely adds meaning beyond the bare enum by explaining each aggregation mode with examples (sum adds value, count counts events, unique_count counts distinct unique_value). Only stripe_event_name goes undiscussed in the description, and the schema covers it.

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 ("Create a meter") plus the underlying endpoint POST /api/v1/meters, which unambiguously separates it from siblings like list_meters and get_meter_rollups that read or aggregate meters.

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?

"Create a meter once" plus "Re-creating an existing key returns meter_exists (harmless)" tells the agent not to pre-check existence, and the free-plan meter cap tells it when creation may fail. It stops short of explicitly contrasting with record_usage_events or list_meters, so there is no formal when-not guidance.

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.

Resources