Skip to main content
Glama

metered-price

Tiered usage pricing: graduated or volume tiers, included quantity, package units, minimum charge — Prices a usage quantity against up to 50 tiers, graduated (each tier prices only its own units) or volume (the tier holding the whole quantity prices all of it), for an agent checking a usage bill or quoting a plan. Order of operations: subtract the included quantity, convert to billing packages (per N units, rounded up, down or not at all), price the tiers, add flat fees, apply the minimum charge

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": {
      "quantity": "<quantity>",
      "mode": "<mode>",
      "tiers": "<tiers>"
    },
    "name": "metered-price"
  }
}

Input Schema

NameRequiredDescriptionDefault
perNoUnits per billing package (default 1). Tiers are expressed in packages.
modeYes
tiersYes
minimumNoMinimum charge in major units, applied after the tiers.
currencyNoISO 4217 alphabetic code, upper case.
exponentNo
includedNoFree quantity subtracted before packaging and tiers (never below zero).
quantityYesDecimal string such as "-12.50" (up to 15 integer and 12 fraction digits). JSON numbers are not accepted: they are binary floats.
roundingNoFinal rounding to the minor unit. Default half-up. half-up: ties away from zero. half-down: ties toward zero. half-even: ties to the even neighbour. up: away from zero. down: toward zero. ceiling: toward +infinity. floor: toward -infinity.
packageRoundingNoHow a partial package is billed when per > 1. Default up.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/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 substantial work: it states the order of operations (subtract included, package, price tiers, add flat fees, apply minimum), explains graduated vs volume semantics, notes included quantity is 'never below zero', and caps tiers at 50. The main gap is that no output schema exists and the description never says what the tool returns (line items, total, rounding result), which an agent quoting a bill would want.

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?

The purpose and headline characteristics are front-loaded, and the trailing order-of-operations clause is genuinely load-bearing for correct invocation. The prose is dense and runs long as a single sentence-chain, so an explicit ordered list would improve scanability, but no sentence is filler.

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 10-parameter pricing calculator with no annotations and no output schema, the description covers process and tier semantics well but omits the return shape entirely, which matters for a tool whose whole job is producing a price breakdown. Currency and exponent parameters are also unexplained. Adequate, but not complete for this complexity.

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 70%, and the description meaningfully extends beyond it: it defines graduated ('each tier prices only its own units') versus volume ('the tier holding the whole quantity prices all of it'), explains packaging as 'per N units' feeding tier expression, and positions included/flat fee/minimum in the calculation pipeline. It does not explain the currency or exponent parameters, leaving two of the ten undocumented in prose.

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 uses a specific verb+resource framing: 'Prices a usage quantity against up to 50 tiers, graduated or volume,' which tells an agent exactly what computation happens. It adds scope details (graduated vs volume, included quantity, packages, minimum charge) that make the tool's domain unmistakable. Sibling differentiation is absent, but the sibling names listed are unrelated tools, so this is a minor gap.

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

Usage Guidelines3/5

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

'For an agent checking a usage bill or quoting a plan' gives a real usage context, so the tool's purpose in a workflow is implied rather than spelled out. There is no explicit statement of when not to use it, no prerequisite conditions (e.g., currency/exponent consistency), and no named alternative. Usage is inferable but not guided.

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