Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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),
          },
        ],
      };
    }
  • 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: [],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lightningfaucet/lightning-wallet-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server