Skip to main content
Glama

check_tx

Read-onlyIdempotent

Run on every transaction before signing. Shows what each wallet gains and loses, blocks drainer tricks, and catches failures and expired blockhashes before you pay a fee. Decodes each step, dry-runs it on live mainnet, finds each wallet's SOL and token changes, and answers OK, REVIEW or BLOCK with reasons. Measured: no false BLOCK on 200 real mainnet transactions; with tx_matches it caught 9 of 9 attack cases (benchmark/ in the repo). Example: {"tx": "<base64, before signing>"}. Cost: 25 free calls a day, then $0.02 USDC per call (x402). Outputs explained: GET /api/tools/check_tx.

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": {
      "tx": "<tx>"
    },
    "name": "check_tx"
  }
}

Input Schema

NameRequiredDescriptionDefault
txYesBase64 transaction, signed or not, legacy, v0 or v1. 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. Changed1 schema field changed
    • changedInput schema / properties / tx / description
      Previous value: -"Base64 transaction, signed or not, legacy or v0. Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx."New value: +"Base64 transaction, signed or not, legacy, v0 or v1. Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx."
  2. 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: -"The transaction, base64-encoded. Signed or not. Legacy and v0 both work. 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: +"Base64 transaction, signed or not, legacy or v0. Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx."
  3. 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: +"The transaction, base64-encoded. Signed or not. Legacy and v0 both work. From your wallet SDK before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'). Or the swap transaction an aggregator API gave you."
  4. 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 behavior, and the description adds substantial context beyond them: live-mainnet dry-run, verdict semantics with reasons, measured false-positive rate, and a concrete pricing/rate limit (25 free calls/day, then $0.02 USDC via x402). No claim conflicts with the 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?

The usage imperative is front-loaded, followed by capability, evidence, example, and cost in a logical order. It is slightly dense with promotional asides ('benchmark/ in the repo', 'Outputs explained: GET /api/tools/check_tx'), but nearly 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?

With no output schema, the description fully covers return behavior by enumerating the OK/REVIEW/BLOCK verdict with reasons. Combined with cost, network scope, and a worked example, nothing an agent needs to call this 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% and already documents both parameters thoroughly, so the baseline is 3. The description reinforces the critical semantics with an example showing tx as base64 'before signing', which clarifies the parameter's intended state beyond the schema wording.

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 action and object ('dry-runs' each step, decodes transactions, returns OK/REVIEW/BLOCK verdicts) and frames its unique scope as a pre-signing safety check. That behavior is clearly distinct from siblings like explain_tx, why_failed, and tx_matches, which it complements rather than duplicates.

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 on every transaction before signing' gives an explicit trigger condition, and the mention of tx_matches' 9-of-9 catch rate implies the complement rather than a substitute. It does not explicitly name when to prefer explain_tx or why_failed, so the exclusions are left implicit.

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.