# nonce_heal

Diagnose and heal the full nonce state for the active wallet in one shot. Handles 90% of stuck-tx cases automatically: 1. Fetches current nonce state from Hiro API (gaps, mempool) 2. In dryRun mode: shows what would happen without broadcasting 3. In execute mode (dryRun=false): - Fills every gap with a 1 uSTX self-transfer to the PoX burn address - Optionally RBF-bumps the chain head (lowest non-gap pending tx) to kick off processing RBF bump behavior: - Token-transfer txs: rebuilt at same nonce with fee * feeMultiplier and rebroadcast - Sponsored txs: skipped with explanation (sender cannot RBF without sponsor key) - Contract-call txs: skipped with manual RBF instructions Always run nonce_health first to understand the current state. Requires wallet to be unlocked for execute mode (dryRun=false). Returns: - address, dryRun flag, confirmedNonce - gapsFound: list of missing nonces - actions: per-action detail (fill_gap or bump_head) with txids, fees, status - warnings: informational notes - summary: human-readable description of what happened

Agent View of the PolicyLayer registry record for `nonce_heal`. HTML page: https://policylayer.com/tools/io-github-aibtcdev-mcp-server/nonce-heal

## Facts

- Tool: `nonce_heal`
- Server: Aibtc (`aibtcdev/aibtc-mcp-server`) — https://policylayer.com/tools/io-github-aibtcdev-mcp-server.md
- Homepage: https://github.com/aibtcdev/aibtc-mcp-server
- Risk category: Execute (High risk)
- Registry record: grade F, identity verified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

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

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

## Why nonce_heal is rated High

This tool executes blockchain transactions whose effects depend on the dryRun parameter and wallet state. While it appears designed to resolve stuck transactions beneficially, it actively broadcasts transactions and modifies mempool state, making it an Execute-category tool.

From the tool's own definition: "Tool description states it 'Diagnose and heal the full nonce state' by filling gaps with self-transfers and RBF-bumping transactions. In execute mode (dryRun=false), it 'rebroadcast[s]' transactions and performs 'self-transfer[s] to the PoX burn address'."

Risk signals: Bulk/mass operation — affects multiple targets

## Use case

AI agents invoke nonce_heal to trigger actions in Aibtc. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Aibtc:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "nonce_heal": {
      "limits": [
        {
          "counter": "nonce_heal_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Aibtc (357)

- `bitflow_cancel_order` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/bitflow-cancel-order.md
- `bounty_cancel` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/bounty-cancel.md
- `credentials_delete` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/credentials-delete.md
- `delete_hiro_api_key` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/delete-hiro-api-key.md
- `identity_unset_wallet` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/identity-unset-wallet.md
- `jingswap_cancel_cycle` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/jingswap-cancel-cycle.md
- `jingswap_cancel_sbtc` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/jingswap-cancel-sbtc.md
- `lightning_lock` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/lightning-lock.md
- `ordinals_p2p_cancel` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/ordinals-p2p-cancel.md
- `pillar_direct_revoke_fast_pool` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/pillar-direct-revoke-fast-pool.md
- `reputation_revoke_feedback` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/reputation-revoke-feedback.md
- `stackspot_cancel_pot` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/stackspot-cancel-pot.md
- `wallet_delete` — Destructive — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/wallet-delete.md
- `broadcast_transaction` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/broadcast-transaction.md
- `btc_sign_message` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/btc-sign-message.md
- `call_contract` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/call-contract.md
- `deploy_contract` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/deploy-contract.md
- `dual_stacking_opt_out` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/dual-stacking-opt-out.md
- `inference_check_provider` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/inference-check-provider.md
- `inscribe_child_reveal` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/inscribe-child-reveal.md
- `inscribe_reveal` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/inscribe-reveal.md
- `jingswap_close_deposits` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/jingswap-close-deposits.md
- `jingswap_settle_with_refresh` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/jingswap-settle-with-refresh.md
- `lightning_unlock` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/lightning-unlock.md
- `news_publisher_compile_brief` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/news-publisher-compile-brief.md
- `nostr_sign_event` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/nostr-sign-event.md
- `pillar_connect` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/pillar-connect.md
- `pillar_key_generate` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/pillar-key-generate.md
- `pillar_key_lock` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/pillar-key-lock.md
- `pillar_key_unlock` — Execute — https://policylayer.com/tools/io-github-aibtcdev-mcp-server/pillar-key-unlock.md
- …and 327 more: https://policylayer.com/tools/io-github-aibtcdev-mcp-server.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=io-github-aibtcdev-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-github-aibtcdev-mcp-server
