Skip to main content
Glama
AbliteratedLLM MCP server

AbliteratedLLM MCP server

Official

Estimate AbliteratedLLM request cost

estimate_cost
Read-only

Estimate a request's USD cost from input, cached, and output token counts using live model prices, so you can plan spend before sending prompts.

Instructions

Estimate the USD cost of a request from token counts and the live catalog prices, with the API's billing formula: (input - cached) × input price + cached × cached-input price + output × output price, per 1M tokens, rounded up to $0.000001. You supply the token counts: this server has no tokenizer, so the result is an estimate. Reasoning tokens are output tokens. To see the most a chat call can cost, pass its max_tokens as output_tokens. No API key needed.

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": {
      "input_tokens": "<input_tokens>",
      "output_tokens": "<output_tokens>"
    },
    "name": "estimate_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel id from list_models. Default glm-5.3-flash-abliterated.glm-5.3-flash-abliterated
priorityNoUse the priority-tier prices (service_tier "priority"). Default false.
input_tokensYesPrompt tokens, cached ones included.
output_tokensYesOutput tokens, reasoning tokens included.
cached_input_tokensNoHow many of input_tokens are read from the prompt cache. Default 0.

Output Schema

NameRequiredDescriptionDefault
noteYes
tierYes
modelYes
tokensYes
cost_usdYes
prices_usd_per_1m_tokensYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial context beyond them: the exact billing formula, the per-1M-token basis, rounding up to $0.000001, that prices come from a live catalog, that reasoning tokens count as output tokens, and that no tokenizer exists so results are estimates. These are precisely the behavioral facts an agent needs before trusting the number.

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?

It is front-loaded with the core purpose and then the formula, and every sentence carries information. It is dense — the formula and rounding clause are packed together — but no sentence is filler, so it stays at a strong 4 rather than being penalized for length.

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?

For a read-only estimator with a full-coverage schema, an output schema, and a mutated-nothing safety profile, nothing material is missing: cost basis, rounding, token sourcing, and tier behavior implications are all covered. An agent can call this correctly from the description alone.

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 earns above that by explaining how parameters interact with the formula (cached tokens priced separately) and by giving the max_tokens-as-output_tokens trick that isn't in the schema. The reasoning-token note is largely redundant with the schema's own 'reasoning tokens included' wording, which caps it at 4.

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 description opens with a specific verb and resource — 'Estimate the USD cost of a request' — and states the inputs (token counts) and basis (live catalog prices). This is clearly distinct from chat, get_balance, and list_models, so an agent can route to it without ambiguity.

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

Usage Guidelines4/5

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

It tells the agent the key operational condition — the server has no tokenizer, so the caller must supply token counts — and offers a concrete usage pattern ('pass its max_tokens as output_tokens' to get an upper bound for a chat call). It also notes no API key is needed. It lacks explicit when-not-to-use guidance or a named alternative, keeping it just short of a 5.

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

Deploy Server

Other Tools