Skip to main content
Glama

fee

Read-onlyIdempotent

Run before setting a priority fee. Gives the price in the unit Compute Budget expects (micro-lamports per compute unit) and the total in SOL, so a unit mix-up never overpays. Turns what recent transactions paid for priority into three prices: cheap, normal, fast. Pass your transaction to get its compute limit and exact cost at each. Example: {} for network prices, or {"tx": ""} for your own. Cost: 25 free calls a day, then $0.01 USDC per call (x402). Outputs explained: GET /api/tools/fee.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fee"
  }
}

Input Schema

NameRequiredDescriptionDefault
txNoYour transaction, so fees match its accounts and compute comes from a dry run. Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx.
networkNoDefault "mainnet-beta" (real money). "devnet" only for test wallets.mainnet-beta

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / network / description
      Previous value: -"Which Solana network to read. Default \"mainnet-beta\" (real money). Leave it out for mainnet. Use \"devnet\" only for test wallets."New value: +"Default \"mainnet-beta\" (real money). \"devnet\" only for test wallets."
    • changedInput schema / properties / tx / description
      Previous 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."New value: +"Your transaction, so fees match its accounts and compute comes from a dry run. Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx."
  2. 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."
  3. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world, so the bar is lower — yet the description adds real context: exact pricing (25 free calls/day, then $0.01 USDC per call via x402), the unit-conversion guarantee, and a dry-run implication when a tx is supplied. It also points to where outputs are explained, which preempts the missing output schema.

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 trigger, then the payoff, then usage modes and cost. Dense but each sentence carries signal; the trailing 'Outputs explained: GET /api/tools/fee' is slightly awkward as prose but still informative.

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?

Two optional parameters, no output schema, and the description covers return shape (three price tiers, units, SOL total), cost/rate limits, and the optional-tx behavior. Nothing an agent needs in order to call it correctly is missing.

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 the zero-argument mode ({} returns network-wide prices) and by clarifying that supplying tx yields the compute limit plus exact cost at each tier — the 'why' behind the parameter, not just its format.

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 concrete verb and resource: it computes a Solana priority fee, returning three tiers (cheap/normal/fast) plus compute-limit-aware costs. The unit detail ('micro-lamports per compute unit' and total in SOL) makes it unmistakable versus siblings like convert or balance.

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 an explicit trigger, and the description distinguishes the two invocation modes ({} for network prices vs {"tx": ...} for your own transaction). It does not name sibling alternatives or say when another tool would be preferable, which keeps it out of 5 territory.

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.