check_utxo
Verify if a Bitcoin transaction output is unspent by providing the transaction hash and output index.
Instructions
Check if a specific transaction output is unspent (UTXO lookup).
Args: txid: Transaction hash vout: Output index
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| txid | Yes | ||
| vout | Yes |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/bitcoin_mcp/server.py:383-394 (handler)The `check_utxo` tool is defined in `src/bitcoin_mcp/server.py` as an MCP tool, using `get_rpc().gettxout()` to query the transaction output status.
def check_utxo(txid: str, vout: int) -> str: """Check if a specific transaction output is unspent (UTXO lookup). Args: txid: Transaction hash vout: Output index """ result = get_rpc().gettxout(txid, vout) if result is None: return json.dumps({"spent": True, "message": "Output is spent or does not exist"}) return json.dumps({"spent": False, "utxo": result})