Skip to main content
Glama

crypto_btc_script

Read-only

Bitcoin script decoder and analyzer — Decode any Bitcoin script offline: script= hex of an output script (scriptPubKey), redeem script, witness script or tapscript; optional network= mainnet (default), testnet, signet, regtest. Returns the ASM disassembly, standard output type (p2pkh, p2sh, p2wpkh, p2wsh, p2tr, pay-to-anchor, bare multisig, p2pk, OP_RETURN with decoded data, future witness versions) and its address, plus an analysis of custom scripts: m-of-n multisig (incl. tapscript CHECKSIGADD), hashlocks, CHECKLOCKTIMEVERIFY/CHECKSEQUENCEVERIFY timelocks with their meaning (block height, date, relative blocks or seconds), HTLC detection, branches, pubkey count and ordinals inscription envelopes. For non-address scripts it also returns the P2SH, P2WSH and P2SH-P2WSH addresses that would lock funds to the script, and warns on reserved opcodes, OP_CODESEPARATOR and size limits. Returns 422 for truncated pushes. No network calls. Price: $0.002 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": {
      "script": "<script>"
    },
    "name": "crypto_btc_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYes5221031b84c5567b126440995d3ed5aaba0565d71e1834604819ff9c17f5e9d5dd078f21024d4b6cd1361032ca9bd2aeb9d900aa4d45d9ead80ac9423374c451a7254d07662102531fe6068134503d2723133227c867ac8fa6c83c537e9a44c3c5bdbdcb1fe33753ae

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 already cover the read-only/non-destructive profile, but the description adds everything else an agent needs: no network calls, a 422 on truncated pushes, warning behavior on reserved opcodes/OP_CODESEPARATOR/size limits, and the x402 payment requirement ($0.002 USDC on Base). The openWorldHint=true annotation sits in mild tension with "No network calls," but that hint concerns unbounded entity space rather than outbound I/O, so it does not rise to a contradiction.

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?

The core action and input format are front-loaded, and the density is justified by the breadth of decoded outputs. It is still a single semicolon-chained run-on whose long parenthetical output catalogue and trailing pricing note are harder to scan than a short bulleted structure would be.

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 full burden and does it well: it enumerates return fields, error behavior, and payment terms, which is more than enough for a decoder. The credibility gap is the network parameter advertised in prose but absent from the schema, leaving a small mismatch an agent may trip over.

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 schema supplies only an example hex, so the description genuinely adds meaning by stating the field is hex and can be an output script, redeem script, witness script, or tapscript. One flaw: it documents an optional network= parameter (mainnet default, testnet, signet, regtest) that does not appear in the input schema, which could lead an agent to pass an unsupported argument.

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?

"Bitcoin script decoder and analyzer" plus "Decode any Bitcoin script offline" gives a specific verb and resource, and the enumerated input kinds (scriptPubKey, redeem script, witness script, tapscript) cleanly separate it from the sibling crypto_btc_tx_decode and crypto_btc_address tools.

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?

It says clearly which artifacts to feed it and that it works offline, which is enough context to pick it over the transaction-level siblings. It never names an alternative or states an exclusion (e.g., "for a full raw transaction use crypto_btc_tx_decode"), so routing is inferred rather than instructed.

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