Skip to main content
Glama

Etuki FinOps & LLM Pricing Oracle

reconcile_usage_receipt

Read-onlyIdempotent

Audits a single API usage receipt against official 1x manufacturer rate cards from the 563-entity UMCE registry to quantify relay multiplier markups and unutilized prefix cache waste. Deterministic mathematical audit in memory requiring no authentication. Returns JSON with expected_theoretical_cost_usd, billing_variance_usd, variance_status ('OVERCHARGED_BY_RELAY_OR_MARKUP' when variance > $0.001 else 'EXACT_RATE_CARD_MATCH'), same_model_unutilized_cache_waste_usd, and net_recoverable_savings_usd. Enforces cached_tokens <= prompt_tokens, pricing (prompt_tokens - cached_tokens) at uncached input rates and cached_tokens at warm cache rates before comparing against actual_billed_usd. Use this tool when verifying an invoice line item; use detect_model_downgrade_and_substitution instead for session-level budget endurance projections.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "reconcile_usage_receipt"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoBilled model ID in 'vendor/model-slug' format (e.g. 'openai/gpt-4o-2024-11-20' or 'openai/gpt-6.1-sol').openai/gpt-4o-2024-11-20
cached_tokensNoSubset of prompt_tokens billed at warm cache read rate (0 <= cached_tokens <= prompt_tokens).
prompt_tokensNoTotal input prompt tokens billed (must be >= cached_tokens).
actual_billed_usdNoActual USD amount deducted on the provider or relay invoice.
completion_tokensNoOutput completion tokens billed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • changedInput schema / properties / actual_billed_usd / description
      Previous value: -"Actual USD amount deducted by the provider or relay for this call."New value: +"Actual USD amount deducted on the provider or relay invoice."
    • addedInput schema / properties / actual_billed_usd / minimum
      Added value: +0
    • addedInput schema / properties / cached_tokens / minimum
      Added value: +0
    • changedInput schema / properties / completion_tokens / description
      Previous value: -"Output completion tokens billed (>= 0)."New value: +"Output completion tokens billed."
    • addedInput schema / properties / completion_tokens / minimum
      Added value: +0
    • changedInput schema / properties / model / description
      Previous value: -"Billed model ID (e.g. 'openai/gpt-4o-2024-11-20' or 'openai/gpt-6.1-sol')."New value: +"Billed model ID in 'vendor/model-slug' format (e.g. 'openai/gpt-4o-2024-11-20' or 'openai/gpt-6.1-sol')."
    • changedInput schema / properties / prompt_tokens / description
      Previous value: -"Total input prompt tokens billed (>= cached_tokens)."New value: +"Total input prompt tokens billed (must be >= cached_tokens)."
    • addedInput schema / properties / prompt_tokens / minimum
      Added value: +0
  2. Changed5 schema fields changed
    • changedInput schema / properties / actual_billed_usd / description
      Previous value: -"Actual billed USD"New value: +"Actual USD amount deducted by the provider or relay for this call."
    • changedInput schema / properties / cached_tokens / description
      Previous value: -"Cached tokens"New value: +"Subset of prompt_tokens billed at warm cache read rate (0 <= cached_tokens <= prompt_tokens)."
    • changedInput schema / properties / completion_tokens / description
      Previous value: -"Completion tokens"New value: +"Output completion tokens billed (>= 0)."
    • changedInput schema / properties / model / description
      Previous value: -"Billed model ID"New value: +"Billed model ID (e.g. 'openai/gpt-4o-2024-11-20' or 'openai/gpt-6.1-sol')."
    • changedInput schema / properties / prompt_tokens / description
      Previous value: -"Total prompt tokens"New value: +"Total input prompt tokens billed (>= cached_tokens)."
  3. Changed5 schema fields changed
    • addedInput schema / properties / actual_billed_usd / description
      Added value: +"Actual billed USD"
    • addedInput schema / properties / cached_tokens / description
      Added value: +"Cached tokens"
    • addedInput schema / properties / completion_tokens / description
      Added value: +"Completion tokens"
    • addedInput schema / properties / model / description
      Added value: +"Billed model ID"
    • addedInput schema / properties / prompt_tokens / description
      Added value: +"Total prompt tokens"
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive/closed-world, but the description adds substantial behavior beyond them: deterministic in-memory math, no authentication required, the exact pricing formula applied to cached vs uncached tokens, an enforced invariant (cached_tokens <= prompt_tokens), and the numeric variance threshold ($0.001) that flips variance_status. These are exactly the traits an agent needs before trusting a cost-audit result.

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?

Purpose, return shape, pricing mechanics, and sibling routing are front-loaded in a logical order with no filler sentences. It is dense to the point of being a single long block, and the 'deterministic ... in memory requiring no authentication' clause partly overlaps the read-only annotations, costing a point.

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

Completeness5/5

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

There is no output schema, yet the description enumerates the returned fields (expected_theoretical_cost_usd, billing_variance_usd, variance_status with its two enum values, same_model_unutilized_cache_waste_usd, net_recoverable_savings_usd). Combined with the pricing rules and invariants, an agent can invoke and interpret this five-parameter tool with no residual questions.

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 100%, so the baseline is 3, but the description goes further by explaining how parameters interact: prompt_tokens minus cached_tokens priced at uncached rates, cached_tokens priced at warm cache rates, then compared against actual_billed_usd. That relational meaning is not derivable from the individual field descriptions alone.

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: audits a single API usage receipt against official 1x manufacturer rate cards from the 563-entity UMCE registry, quantifying relay markup and unutilized prefix cache waste. The scope (single receipt, pricing audit) clearly separates it from routing, cache-layout, and model-discovery siblings.

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

Usage Guidelines5/5

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

Explicitly names the trigger ('Use this tool when verifying an invoice line item') and names the alternative with the condition that selects it ('use detect_model_downgrade_and_substitution instead for session-level budget endurance projections'). Both when-to-use and when-not-to-use are stated, so the agent need not infer routing.

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.