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: [],
      },
    },
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context about key compatibility ('operator and agent keys'), but doesn't disclose other behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens on failure. The description doesn't contradict any annotations since none exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences that each earn their place: the first states the core purpose, the second adds important usage context. There's zero wasted verbiage or repetition, and the information is front-loaded with the most critical detail first.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description provides adequate coverage of what the tool does and its key compatibility. However, for a financial tool, additional context about return format (just satoshis? structured object?), error conditions, or real-time vs. cached data would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't waste space discussing parameters that don't exist, maintaining focus on the tool's purpose and usage context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Check') and resource ('current Lightning balance in satoshis'), making the purpose immediately understandable. It distinguishes this tool from siblings like 'get_transactions' or 'get_budget_status' by focusing specifically on balance checking rather than transaction history or budget status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool by specifying it 'Works with both operator and agent keys,' which helps identify appropriate usage scenarios. However, it doesn't explicitly mention when NOT to use it or name specific alternatives among the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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