Skip to main content
Glama
chia-mcp

chia-mcp

Official
by Chia-Network

get_puzzle_and_solution_with_conditions

Read-only

Retrieve a spent coin's puzzle, solution, and parsed CLVM conditions at its spent block height. Use it to inspect CREATE_COIN, AGG_SIG, and other outputs without a local CLVM interpreter.

Instructions

Get the puzzle, solution, AND parsed CLVM conditions for a coin spent at a specific height. Like get_puzzle_and_solution but also returns the conditions (CREATE_COIN, AGG_SIG, etc.) produced by running the puzzle with the solution. ⚠️ Coinset-hosted-node extension — not available on a local chia-blockchain node or the simulator. For a local node, use get_puzzle_and_solution and evaluate conditions with a local CLVM interpreter. ⚠️ height MUST be the coin's spent_block_index — call get_coin_record_by_name first to obtain it. Passing the current height or confirmed_block_index fails with INVALID_HEIGHT_FOR_COIN.

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": {
      "coin_id": "<coin_id>",
      "height": "<height>"
    },
    "name": "get_puzzle_and_solution_with_conditions"
  }
}

Input Schema

NameRequiredDescriptionDefault
heightYesMust be exactly the spent_block_index from the coin's record (get_coin_record_by_name) — NOT the current chain height and NOT confirmed_block_index. Any other value fails with INVALID_HEIGHT_FOR_COIN.
coin_idYesThe coin ID of the spent coin (0x-prefixed, 32 bytes hex)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, so safety is covered; the description goes well beyond that by disclosing an environment restriction (coinset-only extension, unavailable on local node or simulator) and a concrete failure mode (INVALID_HEIGHT_FOR_COIN). These are non-obvious operational constraints an agent could not infer from structured fields.

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 what the tool returns, then the environment caveat, then the parameter caveat — a sensible order with warning markers for the two traps. It loses a point for restating the height constraint that the schema already documents, making it slightly longer than necessary.

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, and the description compensates by naming the return contents (parsed conditions such as CREATE_COIN, AGG_SIG) and their origin (running the puzzle with the solution). Combined with the environment restriction and prerequisite call, nothing an agent needs to invoke this correctly is missing.

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% and the height field's schema description already carries the spent_block_index-vs-current-height-vs-confirmed_block_index caveat and the INVALID_HEIGHT_FOR_COIN error. The description repeats that constraint verbatim rather than adding new meaning, so it sits at the baseline for fully documented parameters.

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 a three-part resource (puzzle, solution, parsed CLVM conditions) scoped to a coin spent at a specific height. It explicitly contrasts itself with the sibling get_puzzle_and_solution ("Like get_puzzle_and_solution but also returns the conditions"), so an agent can discriminate the two without opening either 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?

Gives explicit when-to-use (coinset-hosted node, need conditions without local CLVM evaluation), explicit when-not (local chia-blockchain node, simulator), and names the alternative to use instead (get_puzzle_and_solution + local CLVM interpreter). It also states a mandatory prerequisite: call get_coin_record_by_name first to obtain spent_block_index.

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