Skip to main content
Glama

Etuki FinOps & LLM Pricing Oracle

detect_model_downgrade_and_substitution

Read-onlyIdempotent

Evaluates LLM rate-card tiers to quantify relay downgrade risk, cost ratios, and remaining coding session turns. Deterministic in-memory calculation requiring no API keys; unknown model IDs safely fall back to the flagship baseline without error. Sums burned_usd and remaining_usd into the total session pool and projects remaining turns against a $137.45 reference budget, returning cost ratios, an endurance matrix, and a recommended production model ID. Use this tool when comparing session burn rates or suspected relay throttling; use reconcile_usage_receipt for single invoice lines, check_context_cliff for prompt-length surcharges, or optimize_prompt_cache_layout for mid-prompt cache breakpoint fixes.

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": "detect_model_downgrade_and_substitution"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoCanonical provider/model ID to evaluate (e.g. 'openai/gpt-6-astra' or 'openai/gpt-6.1-sol').openai/gpt-6-astra
burned_usdNoCumulative USD quota spent in the current coding session.
remaining_usdNoRemaining USD quota balance; combined with burned_usd to derive initial pool size.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / burned_usd / description
      Previous value: -"Cumulative USD quota spent in the current session (>= 0)."New value: +"Cumulative USD quota spent in the current coding session."
    • addedInput schema / properties / burned_usd / minimum
      Added value: +0
    • changedInput schema / properties / model / description
      Previous value: -"Model ID to evaluate (e.g. 'openai/gpt-6-astra' or 'openai/gpt-6.1-sol')."New value: +"Canonical provider/model ID to evaluate (e.g. 'openai/gpt-6-astra' or 'openai/gpt-6.1-sol')."
    • changedInput schema / properties / remaining_usd / description
      Previous value: -"Remaining USD quota balance (>= 0); added to burned_usd to compute total pool."New value: +"Remaining USD quota balance; combined with burned_usd to derive initial pool size."
    • addedInput schema / properties / remaining_usd / minimum
      Added value: +0
  2. Changed3 schema fields changed
    • changedInput schema / properties / burned_usd / description
      Previous value: -"Quota burned so far in USD"New value: +"Cumulative USD quota spent in the current session (>= 0)."
    • changedInput schema / properties / model / description
      Previous value: -"Model ID to inspect"New value: +"Model ID to evaluate (e.g. 'openai/gpt-6-astra' or 'openai/gpt-6.1-sol')."
    • changedInput schema / properties / remaining_usd / description
      Previous value: -"Remaining quota balance in USD"New value: +"Remaining USD quota balance (>= 0); added to burned_usd to compute total pool."
  3. Changed3 schema fields changed
    • addedInput schema / properties / burned_usd / description
      Added value: +"Quota burned so far in USD"
    • addedInput schema / properties / model / description
      Added value: +"Model ID to inspect"
    • addedInput schema / properties / remaining_usd / description
      Added value: +"Remaining quota balance in USD"
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely non-obvious behavior: deterministic in-memory calculation with no API keys, and unknown model IDs falling back to the flagship baseline instead of erroring. It also names the returned artifacts (cost ratios, endurance matrix, recommended model ID), though it does not detail the endurance matrix's shape.

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 scope are front-loaded, and every sentence carries information: purpose, determinism, fallback behavior, aggregation rule, return artifacts, then sibling routing. It is dense but slightly overpacked, with the arithmetic details competing against the usage routing in a single block.

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, and the description compensates by naming the return artifacts (cost ratios, endurance matrix, recommended production model ID). With only three optional parameters, full schema coverage, and rich annotations, nothing an agent needs in order to call this correctly is missing.

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. The description goes modestly beyond the schema by explaining that burned_usd and remaining_usd are summed into a total session pool and that remaining turns are projected against a $137.45 reference budget, which clarifies how the two dollar parameters interact rather than restating them.

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?

The first sentence gives a specific verb and resource: it evaluates LLM rate-card tiers to quantify relay downgrade risk, cost ratios, and remaining coding session turns. It also names the siblings it is not (reconcile_usage_receipt, check_context_cliff, optimize_prompt_cache_layout), so an agent can distinguish it without opening any schema.

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?

It states the triggering conditions explicitly: 'comparing session burn rates or suspected relay throttling.' It then routes three named alternatives to their own scenarios (single invoice lines, prompt-length surcharges, mid-prompt cache breakpoints), which is exactly the when-to-use versus when-not guidance the dimension rewards.

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