check_balance
Retrieve current Lightning wallet balance in satoshis for both operator and agent keys to monitor available funds.
Instructions
Check your current Lightning balance in satoshis. Works with both operator and agent keys.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:853-868 (handler)The handler implementation for the 'check_balance' tool in src/index.ts.
case 'check_balance': { CheckBalanceSchema.parse(args); const result = await session.requireClient().checkBalance(); return { content: [ { type: 'text', text: JSON.stringify({ success: true, balance_sats: result.balanceSats, message: `Current balance: ${result.balanceSats} sats`, }, null, 2), }, ], }; } - src/lightning-faucet.ts:193-202 (handler)The underlying client method 'checkBalance' in src/lightning-faucet.ts that the tool handler calls.
async checkBalance(): Promise<{ balanceSats: number; rawResponse: BalanceResponse; }> { const result = await this.request<BalanceResponse>('get_balance'); return { balanceSats: result.balance_sats || result.balance || 0, rawResponse: result, }; } - src/index.ts:306-313 (registration)Tool registration for 'check_balance' in the listTools handler.
name: 'check_balance', description: "Check your current Lightning balance in satoshis. Works with both operator and agent keys.", inputSchema: { type: 'object', properties: {}, required: [], }, },