Skip to main content
Glama

get_balance

Retrieve the current balance of your connected Bitcoin Lightning wallet to monitor funds using the NWC MCP Server.

Instructions

Get the balance of the connected lightning wallet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'get_balance' tool logic: fetches the wallet balance using the NWC client and returns it formatted as JSON text content.
    async () => { const balance = await client.getBalance(); return { content: [ { type: "text", text: JSON.stringify(balance, null, 2), }, ], }; }
  • The registerGetBalanceTool function that registers the 'get_balance' tool on the MCP server with its description and inline handler.
    export function registerGetBalanceTool( server: McpServer, client: nwc.NWCClient ) { server.tool( "get_balance", "Get the balance of the connected lightning wallet", async () => { const balance = await client.getBalance(); return { content: [ { type: "text", text: JSON.stringify(balance, null, 2), }, ], }; } ); }
  • Site where the 'get_balance' tool is registered by calling registerGetBalanceTool during MCP server setup.
    registerGetBalanceTool(server, client);

Other Tools

Related 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/getAlby/nwc-mcp-server'

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