Skip to main content
Glama

sign_message_btc

DestructiveIdempotent

Sign a message with a Bitcoin address from your Ledger. Returns a signature and SHA-256 hash. Blocks dangerous strings to prevent social-engineering attacks.

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 provide destructiveHint=true and idempotentHint=true. The description adds: on-device prompt, return of base64 signature and messageSha256, refusal of drainer strings before device interaction, and refusal of taproot addresses. This far exceeds annotation info without 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 description is well-structured with a clear lead sentence, but it is lengthy with detailed drainer refusal logic and security notes. While all information is valuable, it could be slightly more concise without losing critical agent guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given complexity (device interaction, security, address types), the description covers prerequisites, constraints, user experience, return values, and safety measures. Without an output schema, it adequately describes outputs. No gaps for a signing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed descriptions for 'wallet' (address types, pairing requirement) and 'message' (max length, usage context). The description adds some context (BIP-137, base64, header byte) but mainly enhances output understanding rather than parameter semantics. Baseline 3 is appropriate.

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 explicitly states 'Sign a UTF-8 message with a paired Bitcoin address using the Bitcoin Signed Message format (BIP-137)'. It clearly identifies the action (sign), resource (message with Bitcoin address), and format, distinguishing it from siblings like sign_message_ltc.

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 provides explicit guidance on when to use (legitimate Sign-In-with-Bitcoin flows) and when not to (messages with drainer strings, taproot addresses). It tells the agent to use other address types if taproot is refused, and explains that legitimate flows don't use the blocked markers.

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/vaultpilot-mcp'

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