Skip to main content
Glama
chia-mcp

chia-mcp

Official
by Chia-Network

decode_offer

Read-only

Decode a Chia offer string into structured coin spends, amounts, signature presence, and spend bundle hash for local inspection; conditions and requested payments are not decoded.

Instructions

Decode a Chia offer string (offer1...) into a structured summary. Returns an array of coin_spends, each with coin_id, parent_coin_info, puzzle_hash, amount_mojos, puzzle_reveal_size_bytes, and solution_size_bytes. Also reports has_aggregated_signature (boolean), num_coin_spends, and spend_bundle_hash. Uses the chia-wallet-sdk for correct bech32m and CLVM deserialization — pure local computation, no RPC calls. STRUCTURE ONLY — shows coin spends and their amounts but does not decode conditions or requested payments. This tool cannot enumerate CREATE_COIN conditions, surface the requested side of the trade, or provide the full picture needed to assess offer fairness. For full offer evaluation, a wallet-level tool is needed. Useful for: identifying which coins are being spent, their amounts, and whether a signature is attached (partial bundles from the maker side typically have one).

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": {
      "offer": "<offer>"
    },
    "name": "decode_offer"
  }
}

Input Schema

NameRequiredDescriptionDefault
offerYesThe Chia offer string (bech32m-encoded, starts with 'offer1...')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.2/5.0
Behavior4/5

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

Adds real context beyond readOnlyHint=true: pure local computation with no RPC calls, use of chia-wallet-sdk for bech32m/CLVM deserialization, and a clear statement of what the output omits (conditions, requested payments). The only shortfall is that it never says how malformed or non-offer1 strings are handled, which matters for a parse tool.

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

Conciseness3/5

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

Front-loads purpose and output shape well, but the limitation is repeated across three sentences ("STRUCTURE ONLY...", "cannot enumerate CREATE_COIN conditions...", "For full offer evaluation, a wallet-level tool is needed"). One of those would have earned its place; the repetition costs it.

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?

With no output schema, the description carries the return-value burden and does so thoroughly (field list plus has_aggregated_signature, num_coin_spends, spend_bundle_hash). Complete for correct invocation, with minor gaps only on failure behavior for malformed input.

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?

Only one parameter with 100% schema description coverage, so the schema already carries the semantics; the description merely restates the 'offer1...' bech32m format. No added guidance on size limits, alternate encodings, or input validation, so the baseline of 3 applies.

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 and resource ("Decode a Chia offer string (offer1...) into a structured summary") and immediately enumerates the returned fields, so the agent knows precisely what the tool produces. The explicit "STRUCTURE ONLY" framing further distinguishes it from any deeper offer-evaluation capability.

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?

Gives an explicit "Useful for:" clause (identifying spent coins, amounts, presence of an aggregated signature) and an explicit when-not: it cannot enumerate CREATE_COIN conditions, surface the requested side of the trade, or support fairness assessment, and that a wallet-level tool is needed instead. Both the selecting condition and the exclusion are stated outright.

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