Skip to main content
Glama

Agent Billing Primitives (Dirtsmith)

mcp_usage_metering

mcp_usage_metering

Record a metered usage event for any MCP tool call and return an invoice line preview (dry run)

Input Schema

NameRequiredDescriptionDefault
unitsNo
sourceNo
metadataNo
caller_idNodemo_caller
tool_nameYes
unit_labelNocall
tool_versionYes
idempotency_keyYes
end_customer_refYes
unit_price_centsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

No annotations exist, so the description carries the full load. It does usefully disclose that this is a '(dry run)' returning a preview, which lowers the perceived risk, but 'Record' implies persistence that the dry-run note partially contradicts, and it says nothing about idempotency-key behavior, auth requirements, or what happens on duplicate keys.

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?

A single front-loaded sentence with no filler; the operation and its return are stated up front. It is arguably too terse for a 10-parameter tool rather than bloated.

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?

For a 10-parameter tool with a nested metadata object, zero annotation coverage and no output schema, one sentence is far from sufficient. Mentioning the invoice-line-preview return partially compensates for the missing output schema, but the dry-run-vs-persist question and the idempotency contract remain unresolved.

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% across 10 parameters (atomic titles, defaults and patterns only), and the description names none of them. Critical semantics like idempotency_key dedupe behavior, units scaling, unit_price_cents meaning, and the metadata constraints are left entirely undocumented.

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?

Uses a specific verb ('Record') with a specific resource ('metered usage event for any MCP tool call') and states the return ('invoice line preview'). An agent can tell this is a billing/metering write-ish operation versus the sibling ledger and lease tools, though it does not name those siblings explicitly.

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?

The phrase 'for any MCP tool call' implies the context of use, and '(dry run)' implies a preview-only intent, but there is no explicit when-to-use, when-not-to-use, or comparison against agent_spend_ledger or agent_lease_lock. Guidance must be inferred.

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.