Skip to main content
Glama
junxit

mcp-bitcoin

by junxit

decode_script

Read-only

Decode hex-encoded scriptPubKey to determine its script type and generate the corresponding address, with optional network override.

Instructions

Decode a scriptPubKey to its type and address. Works offline.

Args: script_hex: The hex-encoded script. network: Override the server's network for address rendering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
networkNo
script_hexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds meaningful behavioral context beyond that by stating 'Works offline' and clarifying that network only affects address rendering. No contradiction with annotations.

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?

The description is compact and front-loaded: a one-sentence purpose, a one-sentence behavioral note, and a minimal Args block. Every line earns its place, and there is no redundant framing or fluff.

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 read-only tool with an output schema, the description covers the operation, offline behavior, and both parameters sufficiently. The only notable gap is the lack of explicit guidance on selecting this tool over sibling decode tools, but that is a minor omission given the clear scriptPubKey focus.

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 has no property descriptions (0% coverage), so the description must compensate. It does so by explaining script_hex as 'the hex-encoded script' and network as an override for address rendering. This adds real meaning beyond the bare schema, though accepted network values are not enumerated.

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?

The description states a precise verb and object: 'Decode a scriptPubKey to its type and address.' This clearly identifies the resource and expected output. It also distinguishes the tool from sibling decoders like decode_wif, decode_psbt, and decode_raw_transaction by specifying scriptPubKey as the input.

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 description clearly implies when to use it: when an agent has a hex-encoded scriptPubKey and needs its type and address. It also notes that the operation works offline, which is useful context. It does not explicitly name alternatives or exclusion criteria, but the resource-specific language is enough for basic routing.

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