Skip to main content
Glama

tx_decode

Read-onlyIdempotent

Decodes a raw signed Cosmos SDK transaction (base64 TxRaw bytes, as found in a CometBFT block's data.txs) into JSON: messages, fee, gas, signers and signatures. Bank, staking, gov and authz messages are fully decoded; other types are returned as type URL plus raw hex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txYesBase64-encoded Cosmos SDK TxRaw protobuf bytes, as returned by a chain's CometBFT RPC /block or /tx_search endpoints.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is handled. The description adds valuable behavioral context beyond annotations: it discloses that Bank, staking, gov, and authz messages are fully decoded while other types are returned as type URL plus raw hex, which is crucial for interpreting output.

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?

The description is two sentences with zero waste. The main action is front-loaded, and the second sentence provides necessary nuance about partial decoding. Every sentence earns its place.

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?

There is no output schema, so the description carries the burden of explaining return values. It specifies the JSON fields (messages, fee, gas, signers, signatures) and the partial decoding behavior for different message types. For a single-parameter read-only tool, an agent has everything needed to call it correctly.

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 description coverage is 100%, so the schema fully documents the 'tx' parameter as base64-encoded Cosmos SDK TxRaw protobuf bytes from CometBFT RPC endpoints. The description adds minimal extra meaning by mentioning the source as 'CometBFT block's data.txs,' which is similar to the schema text. Baseline 3 applies since the schema carries the semantic load.

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 specific verb 'Decodes' and a resource 'raw signed Cosmos SDK transaction' and specifies the output 'JSON: messages, fee, gas, signers and signatures.' It is clearly distinct from sibling tools like jwt_decode or base64, so an agent can tell it apart without needing to open schemas.

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

Usage Guidelines3/5

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

The description implies usage by specifying the exact input format (base64 TxRaw bytes from CometBFT) but does not explicitly state when to use this tool vs alternatives or when not to use it. Since no sibling tool performs a similar function, explicit alternatives are not needed, but the wording leaves usage guidance implied rather than stated.

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.