Skip to main content
Glama

sign_message_btc

DestructiveIdempotent

Sign a UTF-8 message with a paired Bitcoin address using BIP-137 format. Returns base64 signature and SHA-256 hash for cross-device verification, with built-in protection against authorization drainer strings.

Instructions

Sign a UTF-8 message with a paired Bitcoin address using the Bitcoin Signed Message format (BIP-137). Returns a base64-encoded compact signature with a header byte that matches the address-type convention (legacy / P2SH-wrapped / native segwit) AND messageSha256 — a lowercase hex SHA-256 of the exact UTF-8 bytes submitted to the device (Inv #8 byte-fingerprint, issue #454). Surface messageSha256 in the verbatim message-sign block so the user can recompute on a separate device (printf '%s' '<message>' | sha256sum) and catch unicode-confusable substitution attacks the Ledger Nano OLED can't show in full. The Ledger BTC app prompts the user to confirm the message text on-device before signing — same clear-sign UX as send-side flows. DRAINER-STRING REFUSAL (issue #454): the MCP refuses messages containing value-transfer / authorization markers (transfer / authorize / grant / custody / release / consent) or explicit drainer templates ("I authorize", "granting full custody", "I consent to", "I hereby transfer", "release my") BEFORE any device interaction — fires regardless of agent cooperation. Legitimate Sign-In-with-Bitcoin / proof-of-funds flows don't use these markers. Taproot (bc1p…) addresses are refused: BIP-322 (taproot's canonical message scheme) is not yet exposed by the Ledger BTC app; sign with one of your other paired address types from the same Ledger account instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
walletYesPaired Bitcoin source address. Must already be in `pairings.bitcoin` (call `pair_ledger_btc` first). Phase 1 message-signing supports legacy (`1...`), P2SH-wrapped (`3...`), and native segwit (`bc1q...`); taproot (`bc1p...`) is refused because BIP-322 — taproot's canonical scheme — is not yet exposed by the Ledger BTC app.
messageYesUTF-8 message to sign. Typical Sign-In-with-Bitcoin payloads are a few hundred chars; capped at 10000 because the Ledger BTC app's on-device review window chunks the message into 16-char segments and a multi-KB string isn't realistically reviewable.
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true. The description adds significant behavioral context: it returns a base64 signature and messageSha256, refuses drainer strings before any device interaction, refuses taproot addresses with an explanation, and describes the on-device confirmation UX. No contradictions 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with the core purpose first, followed by details on messageSha256, UX, drainer refusal, and taproot refusal. While verbose, every sentence adds value and the structure helps readability. Minor reduction could improve conciseness but is not detrimental.

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?

There is no output schema; the description partially covers return fields (base64 signature and messageSha256) but does not specify exact output structure. Considering complexity (param details, refusal logic, UX), it is fairly complete. An explicit output field list would enhance completeness.

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% with descriptions for both parameters. The tool description adds meaningful context: for 'wallet', it lists supported/refused address types and requires prior pairing; for 'message', it explains typical size, max length rationale, and UTF-8 encoding. This goes beyond the schema's basic constraints.

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 clearly states the tool's purpose: signing a UTF-8 message with a paired Bitcoin address using BIP-137, specifying the return format (base64 signature and messageSha256). It distinguishes itself from siblings by explicitly refusing taproot addresses and drainer strings, and mentions the on-device UX. This provides a specific verb and resource with clear scope.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use the tool (for signing messages with Bitcoin addresses that are legacy, P2SH-wrapped, or native segwit) and when not to use (for taproot addresses or messages containing drainer strings). It provides an alternative: use a different paired address type. It also mentions that legitimate Sign-In-with-Bitcoin flows don't use the refused markers, guiding the agent on appropriate use cases.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/szhygulin/recon-crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server