Skip to main content
Glama

estimate_payment_cost

Estimate the SOL cost to pay a payment_request, covering base fee, priority fee, and first-time ATA rent deposit. Read-only check before sending payment.

Instructions

Estimate the SOL cost of submitting the transaction that would pay a given payment_request. Useful before send_payment on an SPL (USDC/LSM) invoice: the payer still spends SOL for the base fee, priority fee, and (first-time recipients only) ATA rent-exemption deposit. Read-only: does not send anything on-chain.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payment_requestYesJSON-serialized payment_request blob (as received from a provider job-feedback event).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.37
  2. Removedv0.1.36
  3. Addedv0.1.2

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and handles it well: it explicitly states 'Read-only: does not send anything on-chain' and discloses the cost breakdown including base fee, priority fee, and first-time ATA rent-exemption. It does not describe error behavior or whether the estimate is exact, but the core behavioral traits are clear.

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

Conciseness5/5

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

Two sentences with no filler: the purpose is front-loaded, the use case follows, and the fee breakdown is compact. Every sentence adds useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter read-only tool, the description covers purpose, timing, fee components, and safety. The main gap is that there is no output schema and the description does not explicitly state the return format, though 'Estimate the SOL cost' strongly implies the result.

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?

The only parameter is fully documented in the schema (100% coverage), so the baseline is 3. The description references payment_request in context but adds little meaning beyond the schema, which already says it is a JSON-serialized blob from a provider job-feedback event.

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 states a specific verb and resource: 'Estimate the SOL cost of submitting the transaction that would pay a given payment_request.' It also distinguishes this from the sibling send_payment by emphasizing that this tool only estimates and is read-only, so an agent can tell them apart immediately.

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?

The description gives clear usage context: 'Useful before send_payment on an SPL (USDC/LSM) invoice.' It names the relevant sibling and the intended sequencing, and explains the fee components. It does not explicitly say when not to use it, such as for non-SPL payments, so it stops short of a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.