rgb_get_node_info
Retrieve RGB Lightning node details such as ID, version, and network connectivity status to monitor node health and operational readiness.
Instructions
Get RGB node information including ID, version, and network status
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:24-32 (handler)The inline anonymous async function that serves as the handler for the MCP tool 'rgb_get_node_info'. It calls rgbClient.getNodeInfo(), formats the result as JSON text response, and handles errors.async ({}) => { try { const nodeInfo = await rgbClient.getNodeInfo(); return { content: [{ type: 'text', text: JSON.stringify(nodeInfo, 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:20-33 (registration)The server.tool() registration of the 'rgb_get_node_info' MCP tool, specifying name, description, empty input schema ({}), and inline handler function.server.tool( 'rgb_get_node_info', 'Get RGB node information including ID, version, and network status', {}, async ({}) => { try { const nodeInfo = await rgbClient.getNodeInfo(); return { content: [{ type: 'text', text: JSON.stringify(nodeInfo, 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:23-23 (schema)Empty input schema object for the tool (no parameters required).{},
- src/rgb-client.ts:28-30 (helper)Supporting helper method in RGBApiClientWrapper class that wraps the SDK's node.getNodeInfo() call, used by the tool handler.async getNodeInfo() { return await this.client.node.getNodeInfo(); }