# wallet_sweepBsv

Sweep BSV from an external WIF private key into the wallet

## Result

An MCP result containing the operation outcome as text, with structured content where supplied. Check isError before using it; an output schema is shown when registered.

## Permissions

This operation can change wallet, account or service state. A connected wallet applies its own permissions. Guarded broadcasts also require broadcasting to be enabled; service authorization is separate from wallet approval.

## Definition 1 (full)

Registered in: Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; External BRC-100 wallet; Local Vault + sponsor.

Sweep BSV from an external WIF private key into the wallet

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| inputs | array of object | Yes | UTXOs to sweep (use prepareSweepInputs to build these) |  |
| inputs[].outpoint | string | Yes | Outpoint (txid_vout) |  |
| inputs[].satoshis | integer | Yes | Satoshis in output | minimum: -9007199254740991; maximum: 9007199254740991 |
| inputs[].lockingScript | string | Yes | Locking script hex |  |
| wif | string | Yes | WIF private key controlling the inputs |  |
| amount | integer | No | Amount to sweep (satoshis). If omitted, sweeps all input value. | minimum: -9007199254740991; maximum: 9007199254740991 |

Nested requirements apply when their parent is supplied.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "inputs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "outpoint": {
            "type": "string",
            "description": "Outpoint (txid_vout)"
          },
          "satoshis": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991,
            "description": "Satoshis in output"
          },
          "lockingScript": {
            "type": "string",
            "description": "Locking script hex"
          }
        },
        "required": [
          "outpoint",
          "satoshis",
          "lockingScript"
        ]
      },
      "description": "UTXOs to sweep (use prepareSweepInputs to build these)"
    },
    "wif": {
      "type": "string",
      "description": "WIF private key controlling the inputs"
    },
    "amount": {
      "description": "Amount to sweep (satoshis). If omitted, sweeps all input value.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "inputs",
    "wif"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
```

[All tools](https://bsvmcp.com/docs/tools)