Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_check_indexer_url

Validate indexer URL functionality to ensure proper connectivity for RGB asset operations on the Lightning Network.

Instructions

Check if an indexer URL is valid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexerUrlYesThe indexer URL to check

Implementation Reference

  • src/server.ts:286-301 (registration)
    Registration of the 'rgb_check_indexer_url' tool, including input schema and inline handler function that calls the RGB client wrapper and formats the response.
    server.tool( 'rgb_check_indexer_url', 'Check if an indexer URL is valid', { indexerUrl: z.string().describe('The indexer URL to check'), }, async ({ indexerUrl }) => { try { const result = await rgbClient.checkIndexerUrl(indexerUrl); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } } );
  • The handler function for the tool that executes the logic: calls rgbClient.checkIndexerUrl, serializes result to JSON, handles errors.
    async ({ indexerUrl }) => { try { const result = await rgbClient.checkIndexerUrl(indexerUrl); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true }; } } );
  • Input schema using Zod for validating the 'indexerUrl' parameter.
    { indexerUrl: z.string().describe('The indexer URL to check'),
  • Helper method in RGBApiClientWrapper that wraps the underlying SDK call to node.checkIndexerUrl.
    async checkIndexerUrl(indexerUrl: string) { return await this.client.node.checkIndexerUrl({ indexer_url: indexerUrl }); } }

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/lnfi-network/rgb-mcp-server'

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