Skip to main content
Glama
chia-mcp

chia-mcp

Official
by Chia-Network

coin_id

Read-only

Compute a Chia coin ID locally from the parent coin ID, puzzle hash, and amount using SHA256, with no RPC call. Verify coin identity before querying or spending.

Instructions

Compute a coin ID from its three components: parent_coin_id (also accepted as parent_coin_info), puzzle_hash, and amount. The coin ID is SHA256(parent_coin_id + puzzle_hash + amount_bytes). Amount is encoded as a big-endian integer with minimal bytes. Pure local computation, no RPC call.

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": {
      "puzzle_hash": "<puzzle_hash>",
      "amount": "<amount>"
    },
    "name": "coin_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountYesThe coin amount in mojos (use string for values > 9007199254740991)
puzzle_hashYesThe puzzle hash of this coin (0x-prefixed, 32 bytes hex)
parent_coin_idNoThe parent coin's ID (0x-prefixed, 32 bytes hex). Also accepted as parent_coin_info.
parent_coin_infoNoAlias for parent_coin_id — matches the field name used in coin records returned by the RPC.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true; the description adds real behavioral value by disclosing the exact hash construction, the big-endian minimal-byte amount encoding, and the fact that no network round-trip occurs. It does not cover failure behavior for malformed inputs, which keeps it from a 5.

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?

Three tight sentences, front-loaded with the purpose and components, then the algorithm, then the locality guarantee. Nothing is repeated and every sentence adds information an agent needs.

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 fully explains what the return value is (a SHA256 coin ID) and how it is derived. For a deterministic four-parameter local computation with 100% schema coverage, nothing material 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 description coverage is 100%, so the baseline is 3, but the description goes beyond the schema by explaining that amount is hashed as a big-endian integer with minimal bytes and that parent_coin_id is accepted under the RPC field name parent_coin_info. It does not address the string-vs-integer amount form documented in the schema.

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 (compute a coin ID) and enumerates the exact three components it derives it from, including the alias name. It also distinguishes itself from the surrounding get_* RPC siblings by declaring 'Pure local computation, no RPC call.'

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?

The 'no RPC call' framing tells an agent when this is preferable to a lookup tool, and the component list makes the input prerequisites clear. It stops short of explicitly naming an alternative (e.g. get_coin_record_by_name) or stating when this tool is not appropriate, so it is clear context without exclusions.

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