Skip to main content
Glama

crypto_bech32

Read-only

Bech32 / bech32m decoder, validator and prefix converter — Decode and validate any bech32 or bech32m string (BIP173/BIP350): Bitcoin and Litecoin segwit addresses (witness version, program, P2WPKH/P2WSH/P2TR, v0-vs-v1 checksum rules), Cosmos SDK accounts (cosmos, osmo, celestia, inj, sei, noble, dydx and more, with the 20-byte payload in 0x form), Nostr npub/note (warns on nsec), LNURL (decoded URL) and Lightning invoices. Optional to= re-encodes the same payload under other prefixes (comma list, up to 10), e.g. cosmos1... to osmo and inj; a 0x hex input with to= encodes it (EVM address to inj1...). Returns hrp, variant, known chain, payload hex and warnings. Offline; no network calls. Returns 422 with the exact problem (bad character position, mixed case, checksum mismatch) for invalid strings. Price: $0.001 USDC (Base, via x402).

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": {
      "input": "<input>"
    },
    "name": "crypto_bech32"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesbc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare read-only/non-destructive; the description goes well beyond them by naming the exact return fields (hrp, variant, known chain, payload hex, warnings), the 422 failure mode with its specific causes (bad character position, mixed case, checksum mismatch), the nsec warning, the 10-prefix cap, and the $0.001 USDC x402 cost. The 'Offline; no network calls' line is consistent with the paid-API framing and readOnlyHint rather than contradicting it.

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-loaded with the core action, then ordered by formats, conversion, returns, errors, environment, price — a logical progression with no filler sentences. It is dense and long for one paragraph, with the long chain-name enumeration slightly taxing readability, but nearly every clause carries actionable information.

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 compensates by listing the return fields and the error shape, and it covers the conversion feature and cost. The main incompleteness is structural: the to= parameter is described but absent from the input schema, so an agent must guess how to actually pass it.

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?

The schema declares only a single 'input' string with an example value, so the description carries real weight: it explains that input may be a bech32 string or a 0x hex value, and documents an optional to= comma list (max 10) that the schema does not declare at all. That extra meaning is useful, though the mismatch between the description's to= parameter and the schema's parameter list is a gap an agent could trip over.

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 triple of verbs and a precise resource ('Bech32 / bech32m decoder, validator and prefix converter') and then enumerates the concrete string families it handles (segwit, Cosmos SDK, Nostr npub/note, LNURL, Lightning invoices). An agent can tell this apart from crypto_address_validate or crypto_bolt11_decode because it is scoped to bech32-family strings rather than generic addresses or invoices.

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 a clear trigger condition (any bech32/bech32m string) and describes the conversion use case with a worked example ('cosmos1... to osmo and inj'). It stops short of naming sibling alternatives or saying when NOT to use it (e.g. for hex/EVM addresses without to=), so the routing guidance is implicit rather than explicit.

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.

Resources