rgb_list_lightning_channels
Retrieve a list of active Lightning Network channels to monitor channel status, capacity, and connectivity for managing Bitcoin and RGB asset transactions.
Instructions
List Lightning Network channels
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "rgb_list_lightning_channels"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:221-234 (registration)Registers the 'rgb_list_lightning_channels' MCP tool with empty input schema. The handler fetches Lightning channels via rgbClient.listChannels() and returns formatted JSON or error.
server.tool( 'rgb_list_lightning_channels', 'List Lightning Network channels', {}, async ({}) => { try { const channels = await rgbClient.listChannels(); return { content: [{ type: 'text', text: JSON.stringify(channels, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } } ); - src/rgb-client.ts:97-99 (handler)Handler method in RGBApiClientWrapper that implements the core logic by delegating to the underlying RGB API SDK's lightning.listChannels().
async listChannels() { return await this.client.lightning.listChannels(); }