Skip to main content
Glama

Create meter

create_meter

Create a usage meter between a provider and a consumer agent.

unit: what is being counted (call, token, kwh, ...). Price is in minor
currency units (cents) per unit. Returns the meter_id.

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": {
      "provider": "<provider>",
      "consumer": "<consumer>",
      "unit": "<unit>",
      "price_minor_per_unit": "<price_minor_per_unit>"
    },
    "name": "create_meter"
  }
}

Input Schema

NameRequiredDescriptionDefault
unitYesWhat is counted, for example call, token or kwh.
consumerYesAgent id of the party consuming it.
currencyNoISO 4217 currency code, for example USD.USD
providerYesAgent id of the party providing the service.
sla_targetNoTarget success rate between 0 and 1. Default 0.99.
price_minor_per_unitYesPrice per unit in minor units (cents).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed6 schema fields changed
    • addedInput schema / properties / consumer / description
      Added value: +"Agent id of the party consuming it."
    • addedInput schema / properties / currency / description
      Added value: +"ISO 4217 currency code, for example USD."
    • addedInput schema / properties / price_minor_per_unit / description
      Added value: +"Price per unit in minor units (cents)."
    • addedInput schema / properties / provider / description
      Added value: +"Agent id of the party providing the service."
    • addedInput schema / properties / sla_target / description
      Added value: +"Target success rate between 0 and 1. Default 0.99."
    • addedInput schema / properties / unit / description
      Added value: +"What is counted, for example call, token or kwh."
  3. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, and openWorldHint=false. The description adds the return value ('Returns the meter_id') and clarifies that price is expressed per unit in minor units, which is genuine context beyond the annotations. However, for a non-idempotent create it does not warn that retrying or re-calling yields duplicate meters, nor does it describe failure conditions.

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?

Short, front-loaded, and free of padding; the core action comes first, followed by unit/price clarifications and the return value. Minor redundancy: the unit examples and cents-per-unit note largely repeat what the schema already states for those two fields.

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?

With an output schema present, the description need not explain return values, though it helpfully names meter_id. For a creating, non-idempotent mutation it is adequate but incomplete: it omits preconditions (agent existence), duplicate-meter risk on retry, and error behavior, leaving the agent to infer the setup workflow from sibling tools.

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

Parameters3/5

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

Schema description coverage is 100%, so all six parameters are already documented, including unit, currency, and price_minor_per_unit. The description restates the unit examples and price-in-cents rule, which duplicates rather than extends the schema, and says nothing about sla_target or the id formats for provider/consumer. Baseline 3 is appropriate.

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 opening sentence gives a specific verb and resource: 'Create a usage meter between a provider and a consumer agent.' That is unambiguous and immediately distinguishable from siblings like flag_meter, record_usage, or list_meters. It stops short of a 5 because it never explicitly contrasts itself with those siblings or states the boundary (e.g., meter creation vs. usage recording).

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 when-to-use guidance, no prerequisites (must the provider/consumer agents already exist?), and no mention of alternatives or the natural next step such as record_usage. The verb 'create' implies a setup step, but the agent must infer that this must precede usage recording and that repeating it produces a new meter rather than reusing one.

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.