Skip to main content
Glama

ExchangeRebel — pay-per-call APIs for AI agents (x402 on Solana)

token_efficiency_budget

$0.02 USDC on Solana per call — the payment buys one signed payload-budget report for one submitted payload and your stated token budget: (1) a fit verdict stating the payload's token count under the pinned cl100k_base tokenizer, your effective budget, and whether it fits or the exact excess; (2) where it does not fit, a shaped payload produced only by the four published mechanical operations (S-1 duplicate removal, S-2 empty-field removal, S-3 per-field truncation, S-4 tail truncation, in that order); and (3) a drop receipt listing every operation applied, by field, with token counts before and after that reconcile exactly. No operation selects content by meaning; nothing is summarised or rewritten by a model. Submitted payloads are processed in memory only and never stored; the paid retry re-sends the payload.

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": {
      "payload": "<payload>",
      "budget_tokens": "<budget_tokens>"
    },
    "name": "token_efficiency_budget"
  }
}

Input Schema

NameRequiredDescriptionDefault
payloadYesThe one payload to check, as text or as JSON text. Processed in memory only and never stored.
keep_fieldsNoOptional field paths protected from shaping operations.
budget_tokensYesThe token budget the payload must fit, counted under the published pinned tokenizer (cl100k_base). No default: a call without a valid budget_tokens is a free validation refusal.
reserve_tokensNoOptional reserve subtracted from budget_tokens to form the effective budget.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses the price and currency, that payloads are processed in memory only and never stored, that the operation is purely mechanical with no model summarization, and that retries re-send the payload. These are exactly the behavioral facts an agent needs before spending money on a non-idempotent call, and nothing conflicts with the annotations.

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 price and the tool's purpose are front-loaded and every clause carries information, including the numbered enumeration of report parts. It is delivered as one long run-on sentence, which makes it denser than necessary, but there is little wasted wording to cut.

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 fully compensates by specifying the three return components, the tokenizer used, the exact operation set and its order, and the reconciliation guarantee of the drop receipt. For a paid, non-idempotent tool, this is complete enough for an agent to call it and interpret the result correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already documented, including keep_fields and reserve_tokens. The description adds the ordering of the four shaping operations (S-1 to S-4), which is contextually relevant to how protected fields behave, but it never mentions keep_fields or reserve_tokens directly, so it adds only marginal meaning beyond the schema.

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

Purpose4/5

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

The description states a specific verb and resource: it produces a signed payload-budget report for one submitted payload and budget, and it enumerates the three report components (fit verdict, shaped payload, drop receipt). It does not name or distinguish itself from the sibling token_efficiency_precheck or token_efficiency_criteria, so an agent must infer the boundary between the free precheck and this paid call.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the $0.02 USDC price and the note that 'the paid retry re-sends the payload' tell the agent this is a paid step, and the schema's mention of a 'free validation refusal' hints at a validation path. There is no explicit when-to-use or when-not-to-use guidance, and no alternative tool is named for a free dry run.

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