Skip to main content
Glama

check_context_cliff

Read-onlyIdempotent

Check whether a prompt token count crosses vendor long-context surcharge thresholds and get the active multiplier plus a flat-context alternative before sending large prompts.

Instructions

Evaluates whether a prompt token count crosses vendor long-context surcharge thresholds (100K on Claude Haiku 5.5, 128K on GPT-4o, 200K on Gemini 2.5 Pro, or 272K on GPT-6.1 Sol) and returns the surcharge multiplier and recommended flat-context alternative. Deterministic threshold lookup against the embedded 563-entity UMCE registry requiring no API keys. Returns JSON with crosses_cliff_boolean, active_surcharge_multiplier (1.0x below cliff vs 2.0x-5.0x above cliff), and recommended_flat_context_model. Compares prompt_tokens directly against model's specific cliff boundary in the UMCE catalog. Use this tool before sending large prompts (>90K tokens) to avoid 2x-5x cliff surcharges; use compress_and_fold_context instead to shrink the prompt below the cliff.

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

Input Schema

NameRequiredDescriptionDefault
modelNoModel ID ('vendor/model-slug') to evaluate against context-window pricing cliffs.openai/gpt-6.1-sol
prompt_tokensNoInput prompt token count to test against vendor cliff thresholds.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the readOnly/idempotent/closed-world annotations, the description discloses that the lookup is deterministic, requires no API keys, and draws on an embedded registry, plus it names the three return fields. It stops short of describing edge-case behavior (unknown model IDs, negative or zero tokens) that would fully round out the disclosure.

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 and threshold table are front-loaded, then behavior, then return shape, then usage — a sensible order with no filler sentences. It is dense with parentheses and parenthetical multipliers, making it slightly heavier to parse than necessary, but every sentence carries distinct information.

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?

With no output schema, the description compensates by naming the returned fields and their value ranges (1.0x vs 2.0x–5.0x). For a two-parameter, keyless, read-only lookup, nothing an agent needs in order to call it 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, but the description adds real meaning by mapping specific model families to their cliff boundaries (100K Claude, 128K GPT-4o, 200K Gemini, 272K GPT-6.1 Sol) — information absent from the schema, whose model parameter has no enum. It does not add anything further about prompt_tokens beyond confirming direct comparison against the boundary.

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 opening sentence gives a specific verb and resource ('Evaluates whether a prompt token count crosses vendor long-context surcharge thresholds') and enumerates the exact boundaries it tests against. It is clearly distinguishable from compress_and_fold_context, which is named explicitly as the alternative.

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?

The final sentence states when to call it ('before sending large prompts (>90K tokens)') and names the sibling to use instead when the goal is to shrink the prompt rather than measure it. The when/when-not/alternative triad is fully covered.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.