Skip to main content
Glama

Solana x402 preflight

solana_x402_preflight
Read-onlyIdempotent

Can this payer settle this x402 payment requirement right now? When to use: After an x402 server answered 402 with a Solana exact requirement: to check, before signing, that this payer can settle that exact requirement to that recipient now. Prefer another tool: For a transfer that is not an x402 requirement (use /v1/solana/transfer-readiness), or once the payment has settled (use /v1/solana/payment/verify). Example: solana_x402_preflight {"asset":"2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo","amount":"1000000","pay_to":"29d2S7vB453rNYFdR5Ycwt7y9haRT5fwVwL9zTmBhfV2","payer":"6vk7icY2FzdMTzMGE4aNRSzovanAmS7xsv9uHwj4YuzY"} Paid: 0.02904 USDC or 0.0242 EURC per call on Solana mainnet, VAT included. With prepaid credits, debit per call: 0.02 EUR-denominated units (approx 50 calls per bundle) or 0.024 USD-denominated units (approx 34 calls per bundle).

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": {
      "asset": "<asset>",
      "amount": "<amount>",
      "pay_to": "<pay_to>",
      "payer": "<payer>"
    },
    "name": "solana_x402_preflight"
  }
}

Input Schema

NameRequiredDescriptionDefault
assetYesMint of the x402 requirement: the token the payment moves (base58, 32 bytes); `SOL` is not accepted, because an x402 SVM `exact` payment is always a token transfer
payerYesWallet that would pay: Solana wallet address: a base58 string that decodes to exactly 32 bytes
amountYesAmount the requirement asks for, in the mint's base units (not UI units): a whole number of digits, at most 18446744073709551615
pay_toYesWallet the requirement pays (not its token account): Solana wallet address: a base58 string that decodes to exactly 32 bytes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds useful timing context ('before signing', 'right now' implying a live point-in-time check) and cost per call, but never says what the check returns (a boolean, a reason code, failing conditions), which is a real gap given there is no 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?

The definition is front-loaded with the core question and then uses explicit labels ('When to use', 'Prefer another tool', 'Example'), which makes it easy to scan. The closing pricing/credits sentences are longer than necessary and dilute the signal, though cost transparency has some justification for a paid call.

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 four-required-parameter read-only preflight with full schema coverage and existing annotations, the description supplies the essential decision context: the triggering condition, the alternatives, and a worked example. The one substantive omission is return-value semantics, which matters more here because no output schema exists to explain what a pass/fail result looks like.

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 coverage is 100%, so all four parameters are already documented in detail, and the description adds little semantic detail beyond them. The embedded example call is helpful for showing realistic value shapes (base58 mint, base-unit amount, three distinct wallets), but it does not explain any parameter meaning the schema lacks.

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 opens with a specific question form that names both the resource (x402 payment requirement) and the actor (payer), then clarifies it verifies the exact Solana `exact` requirement to a specific recipient 'before signing'. That is enough detail for an agent to distinguish it from `solana_transfer_readiness` or `solana_payment_verify` without opening any schema.

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

Usage Guidelines5/5

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

It gives an explicit trigger ('After an x402 server answered 402 with a Solana `exact` requirement'), an explicit exclusion for non-x402 transfers routing to `/v1/solana/transfer-readiness`, and an explicit post-settlement exclusion routing to `/v1/solana/payment/verify`. Both alternatives and the conditions that select them are stated, leaving nothing 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