rgb_get_node_status
Retrieve current status and uptime information for your RGB Lightning Network node to monitor operational health and connectivity.
Instructions
Get RGB node status and uptime information
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:35-48 (registration)Registers the 'rgb_get_node_status' MCP tool with empty input schema and an inline handler function that invokes rgbClient.getNodeStatus() and formats the response.
server.tool( 'rgb_get_node_status', 'Get RGB node status and uptime information', {}, async ({}) => { try { const status = await rgbClient.getNodeStatus(); return { content: [{ type: 'text', text: JSON.stringify(status, 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:32-38 (handler)Core implementation of getNodeStatus in RGBApiClientWrapper: fetches node state from the underlying SDK client and maps numeric state to human-readable status, with placeholder uptime.
async getNodeStatus() { const state = await this.client.node.getNodeState(); return { status: state === 4 ? 'SERVER_ACTIVE' : state === 1 ? 'LOCKED' : 'NON_EXISTING', uptime: 0 // Not available in SDK }; }