Skip to main content
Glama

meter_token_cost

Meter token usage cost for an LLM request profile. ($2.00)

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": {
      "model": "<model>",
      "prompt_tokens": "<prompt_tokens>",
      "completion_tokens": "<completion_tokens>"
    },
    "name": "meter_token_cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelYes
paymentNoOptional payment: x402 base64 payment payload, or MPP voucher (mpp.v1...). Without it, the tool returns a payment_required challenge.
prompt_tokensYes
completion_tokensYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

C2.3/5.0
Behavior2/5

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

With no annotations supplied, the description carries the full behavioral burden and discloses almost nothing: it does not say whether this is a read-only calculation or a billable/stateful operation, nor what happens when payment is absent. The cryptic "($2.00)" hints at a price but never explains the payment flow, which is the most consequential behavioral fact for this tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short, but brevity here reflects under-specification rather than efficiency. The trailing "($2.00)" is unexplained noise, and the one substantive sentence is too compressed to front-load the key facts about payment or output.

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 4-parameter tool with no annotations, no output schema, and a paid-invocation model implied by the payment parameter, the description is far too thin. An agent would not know what the tool returns, whether the call incurs a charge, or how the payment challenge is surfaced.

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 only 25% (only payment is documented), so the description must compensate for model, prompt_tokens, and completion_tokens — it does not. "LLM request profile" loosely gestures at model and token counts but adds no format, range, or unit information beyond what the bare schema types already convey.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Meter token usage cost for an LLM request profile" names a verb (meter) and a resource (token usage cost), and mentions LLM requests, so the general domain is clear. But "meter" is ambiguous between computing a cost and charging/billing it, and the parenthetical "($2.00)" adds no clarifying meaning. No sibling differentiation is offered, though the siblings listed are in unrelated domains.

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

Usage Guidelines2/5

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

The description gives no when-to-use, when-not-to-use, or alternative guidance of any kind. An agent cannot tell from the text whether this should be called before, during, or after an LLM request, nor what the $2.00 implies about invocation conditions.

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