rgb_get_network_info
Retrieve network status and configuration details from the RGB Lightning Node to monitor connectivity and operational parameters.
Instructions
Get network information from the RGB node
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:152-165 (registration)Registration of the 'rgb_get_network_info' MCP tool, including description, empty input schema, and inline handler that calls the RGB client's getNetworkInfo method and returns formatted JSON or error.server.tool( 'rgb_get_network_info', 'Get network information from the RGB node', {}, async ({}) => { try { const networkInfo = await rgbClient.getNetworkInfo(); return { content: [{ type: 'text', text: JSON.stringify(networkInfo, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } } );
- src/server.ts:152-165 (handler)The inline handler function executes the tool logic by fetching network information via rgbClient and responding with JSON.server.tool( 'rgb_get_network_info', 'Get network information from the RGB node', {}, async ({}) => { try { const networkInfo = await rgbClient.getNetworkInfo(); return { content: [{ type: 'text', text: JSON.stringify(networkInfo, 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:40-42 (helper)Helper method in RGBApiClientWrapper that wraps the SDK call to retrieve network information from the RGB node.async getNetworkInfo() { return await this.client.node.getNetworkInfo(); }