Skip to main content
Glama

fee

Read-onlyIdempotent

Run before setting a priority fee. Gives the price in the exact unit Compute Budget expects (micro-lamports per compute unit) and the total cost in SOL, so a unit mix-up never overpays. Turns recent on-chain priority fees into three prices: cheap, normal and fast. Pass your transaction to get its compute limit and exact cost at each price. Inputs: tx (optional): Optional. Your transaction, so fees are measured on the accounts it writes to and compute is measured by a dry run. network (optional): Which Solana network to read. Default "mainnet-beta" (real money). Cost: 25 free calls a day, then $0.01 USDC per call (x402). Full field-by-field docs: GET /api/tools/fee.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txNoOptional. Your transaction, so fees are measured on the accounts it writes to and compute is measured by a dry run. From your wallet SDK before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'). Or the swap transaction an aggregator API gave you.
networkNoWhich Solana network to read. Default "mainnet-beta" (real money). Leave it out for mainnet. Use "devnet" only for test wallets.mainnet-beta

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / network / description
      Added value: +"Which Solana network to read. Default \"mainnet-beta\" (real money). Leave it out for mainnet. Use \"devnet\" only for test wallets."
    • addedInput schema / properties / tx / description
      Added value: +"Optional. Your transaction, so fees are measured on the accounts it writes to and compute is measured by a dry run. From your wallet SDK before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'). Or the swap transaction an aggregator API gave you."
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, openWorld), and the description layers on costly, non-obvious traits: a dry run measures compute for the passed tx, 25 free calls/day then $0.01 USDC via x402, and the exact unit returned (micro-lamports per compute unit). These are behavioral facts an agent cannot infer from 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?

Front-loaded with the usage instruction and unit-safety benefit, then outputs, then inputs, then cost. Slightly long and partly duplicates the schema's param text, but every sentence carries actionable 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?

Despite having no output schema, the description explains the return shape (three price tiers, compute limit, exact SOL cost per price) and the cost model. Nothing essential to correct invocation is missing.

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 both params are already fully documented with examples (base64 serialization, enum networks). The description restates the same tx/network semantics without adding format or constraint detail beyond the schema, 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?

States a specific verb and resource: it reads recent on-chain priority fees and returns cheap/normal/fast prices plus compute cost. Clearly distinguishable from siblings like balance, blockhash, or convert.

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?

"Run before setting a priority fee" gives explicit timing/context for use, and the pricing note implies call budgeting. It does not name alternative sibling tools or state when NOT to use it, but the trigger condition is clear.

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.