Skip to main content
Glama

Ankr Agent RPC

Transaction by hash

getTransaction
Read-only

Get a transaction by its hash on one blockchain, with tier-2 decoding requested. Check tier_degraded before reading function or args. By default the receipt is fetched too (status, gas used, decoded logs). Set include to "transaction" to skip it and halve the cost. Tier-2 field names: tx, block, block_hash, from, to, value, gas_limit, gas_price, gas_used, status ("success"|"failed"), function, args (named object), logs[] ({ contract, event, args } when decoded, else { address, topics, data, _event_unknown }). All numeric values are decimal strings and all addresses are EIP-55 checksummed. Sui: pass the digest; include is ignored.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesChain slug as in rpc.ankr.com/<chain> — any chain Ankr serves (see listChains)
txHashYesTransaction hash (0x + 64 hex) or Sui digest
includeNoWhich parts to fetch. "all" (default) returns both the transaction and the receipt; "transaction" returns only eth_getTransactionByHash; "receipt" returns only eth_getTransactionReceipt.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint/openWorldHint, so the description carries the rest and does so well: default receipt fetching, the cost trade-off of `include`, the tier_degraded caveat, the exact shape of tier-2 fields including decimal-string numerics and EIP-55 checksummed addresses, and the Sui digest path. This is meaningful behavior disclosure beyond structured data.

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-loads the core purpose, then the cost/`include` guidance, then the return-field contract. Every sentence carries information, though the enumerated tier-2 field list is dense and slightly dump-like in a single block.

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 present, the description must describe the return shape, and it does — field names, value formats, log object variants, and the unknown-event fallback. Combined with the include semantics and Sui exception, an agent has everything needed to call and interpret this tool.

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 already 100%, so the baseline is 3, but the description adds value the schema lacks: that `include` controls cost (halving it) and is ignored on Sui, and that txHash is a digest on Sui. It reinforces the default ("all") documented in the schema rather than merely repeating it.

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?

Opens with a specific verb+resource ("Get a transaction by its hash on one blockchain") plus a scope qualifier (tier-2 decoding requested). This is clearly distinguishable from sibling read tools like getBlock, getLogs, and rpcCall, which an agent can rule out 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 Guidelines4/5

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

Gives concrete operational guidance: the receipt is fetched by default, set include="transaction" to skip it and halve cost, and check tier_degraded before reading function/args. It also notes Sui ignores `include`. It stops short of explicitly naming an alternative tool or stating when another sibling should be preferred.

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.