Skip to main content
Glama
chia-mcp

chia-mcp

Official
by Chia-Network

address_encode

Read-only

Convert a puzzle hash to a bech32m Chia address (xch1 or txch1) with local computation and no RPC call, flagging warnings when the prefix differs from the configured network.

Instructions

Convert a puzzle hash to a bech32m Chia address (xch1... for mainnet, txch1... for testnet11). Pure local computation, no RPC call. If you supply a prefix that differs from the configured network (e.g., txch on mainnet), the result includes a warning field — cross-network encoding is allowed but may indicate intent to send to the wrong network. Always use address_decode to validate the prefix before querying the chain.

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>"
    },
    "name": "address_encode"
  }
}

Input Schema

NameRequiredDescriptionDefault
prefixNoAddress prefix: 'xch' for mainnet, 'txch' for testnet11. Defaults to current network's prefix.
puzzle_hashYesThe puzzle hash to encode (0x-prefixed, 32 bytes hex)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A4.1/5.0
Behavior3/5

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

readOnlyHint=true is already declared, and 'Pure local computation, no RPC call' reinforces it rather than contradicting it. The genuinely additive disclosure is the warning field emitted on cross-network encoding, which is behavior no annotation or schema conveys. It stops short of describing the output shape (no output schema exists), so it earns a solid but not exceptional mark.

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?

Four short sentences, front-loaded with the core transformation, with the local-computation note and the mismatch caveat both earning their place. The closing sentence about address_decode is the least clear and slightly dilutes the otherwise tight structure.

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?

For a two-parameter, one-required local computation with full schema coverage and a closed enum, the description covers the inputs, the side-effect-free nature, and the one noteworthy output anomaly. Only the precise returned address/warning field structure is left unspecified, which is minor given the low complexity.

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 100% and the prefix enum is already documented, so baseline is 3. The description adds meaning beyond the schema by explaining the consequence of choosing a non-matching prefix (warning field, allowed but a likely misconfiguration), which helps an agent reason about the parameter rather than just format 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?

States a specific verb and resource ('Convert a puzzle hash to a bech32m Chia address') and names the concrete output forms (xch1... / txch1...), so an agent immediately knows the transformation performed. It is also clearly distinct from address_decode and the chain-query siblings.

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 real context: cross-network prefixes are allowed and point the agent at address_decode as the validation step before querying the chain. There is no explicit when-not, and the advice to use address_decode to 'validate the prefix' is slightly muddled since decode validates an address, not a prefix.

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