# decode_invoice

Decode a Lightning invoice

Agent View of the PolicyLayer registry record for `decode_invoice`. HTML page: https://policylayer.com/tools/abdelstark-bitcoin-mcp/decode-invoice

## Facts

- Tool: `decode_invoice`
- Server: Bitcoin MCP Server (`abdelstark/bitcoin-mcp`) — https://policylayer.com/tools/abdelstark-bitcoin-mcp.md
- Homepage: https://github.com/AbdelStark/bitcoin-mcp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Allowed

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "decode_invoice",
    "arguments": {}
  }
}
```

## Why decode_invoice is rated Low

Decoding an invoice is a query operation that extracts and parses structured data from an invoice string. It retrieves information (amounts, recipients, expiration, etc.) without modifying data, executing transactions, or moving funds. The tool reads and interprets existing invoice data, making it a Read category operation with low severity since misuse would only expose information already encoded in the invoice.

From the tool's own definition: "Tool name 'decode_invoice' and description 'Decode a Lightning invoice' indicate data retrieval and parsing of invoice information with no state modification or financial movement."

## Use case

AI agents call decode_invoice to retrieve information from Bitcoin MCP Server without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Bitcoin MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "decode_invoice": {}
  }
}
```

## Other tools on Bitcoin MCP Server (6)

- `pay_invoice` — Financial — https://policylayer.com/tools/abdelstark-bitcoin-mcp/pay-invoice.md
- `decode_tx` — Read — https://policylayer.com/tools/abdelstark-bitcoin-mcp/decode-tx.md
- `get_latest_block` — Read — https://policylayer.com/tools/abdelstark-bitcoin-mcp/get-latest-block.md
- `get_transaction` — Read — https://policylayer.com/tools/abdelstark-bitcoin-mcp/get-transaction.md
- `validate_address` — Read — https://policylayer.com/tools/abdelstark-bitcoin-mcp/validate-address.md
- `generate_key` — Write — https://policylayer.com/tools/abdelstark-bitcoin-mcp/generate-key.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=abdelstark-bitcoin-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/abdelstark-bitcoin-mcp
