Skip to main content
Glama

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

fee_oracle_recipe

Solana landing recipe: one call that fuses the fee oracle's /estimate and /optimize — send an unsigned transaction, get the simulated compute-unit limit, priority-fee tiers (economy=p50, balanced=p75, fast=p95) with the chosen tier marked, the expected total fee, the ready-to-sign rewritten transaction, and a precomputed 3-rung escalation ladder. Optional fee_cap_lamports: if the chosen tier exceeds it, the answer flags cap_exceeded and returns no rewritten transaction. Paid: $0.01 flat per call via x402. Free pre-check at POST /toll/fees/recipe/preflight (same JSON body) validates structurally and states the exact price before payment; our-side failure after settlement queues an automatic refund intent (you only pay for delivered answers).

Input Schema

NameRequiredDescriptionDefault
urgencyNoeconomy=p50, balanced=p75, fast=p95 priority-fee percentile; selects the tier baked into rewritten_tx.balanced
fee_cap_lamportsNoOptional max total fee in lamports. If the chosen tier's expected total fee exceeds it, the answer carries cap_exceeded:true and rewritten_tx:null — never an over-cap transaction.
transaction_base64YesUnsigned Solana transaction, base64 (same field as /estimate and /optimize). Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true), the description discloses pricing, the exact preflight save-point, the refund intent on post-settlement server failure, and the precise cap semantics (cap_exceeded:true plus a null rewritten_tx rather than an over-cap transaction). These are the operational facts an agent needs before spending money, and none of them are recoverable from the structured fields.

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 promise and then layers on payment and cap semantics, and nearly every clause carries information. It is a single dense run-on block, though, and the pricing/refund sentence could be split or trimmed without loss of decision-relevant content.

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 enumerating every returned field (simulated CU limit, marked tiers, expected total fee, rewritten transaction, 3-rung ladder) plus the one conditional branch that changes the shape (cap_exceeded / rewritten_tx null). Combined with pricing and preflight guidance, an agent has everything needed to call it and interpret the answer.

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 the schema already documents the urgency enum with p50/p75/p95 mapping, the fee_cap_lamports cap behavior, and the required base64 transaction field. The description restates the same facts (tier percentiles, cap_exceeded outcome) without adding new syntax, format, or constraint detail, so the baseline 3 applies.

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 names a specific verb and resource ('Solana landing recipe') and explicitly frames it as a fusion of the fee oracle's /estimate and /optimize endpoints, which maps directly onto the sibling tools fees_estimate and fees_optimize. It then enumerates the concrete outputs (compute-unit limit, marked fee tiers, expected total fee, rewritten transaction, escalation ladder), so an agent knows exactly what this call buys that the siblings do not.

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?

Usage context is clear: it is a paid all-in-one call ($0.01 flat via x402) and a free structural pre-check is available at /toll/fees/recipe/preflight before paying. However, it never states when NOT to use it — e.g. 'use fees_estimate if you only need tiers for a transaction you won't rewrite' — and it does not name the sibling tools it displaces, leaving that routing to inference.

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