Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_generate_address

Create a new on-chain Bitcoin address for receiving RGB assets or Bitcoin through the RGB Lightning Network MCP Server.

Instructions

Generate a new on-chain address

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler function for 'rgb_generate_address'. It calls rgbClient.generateAddress() and returns the result as JSON text or an error.
    async ({}) => {
      try {
        const address = await rgbClient.generateAddress();
        return { content: [{ type: 'text', text: JSON.stringify(address, 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:122-135 (registration)
    Registration of the 'rgb_generate_address' MCP tool with empty input schema and inline handler.
    server.tool(
      'rgb_generate_address',
      'Generate a new on-chain address',
      {},
      async ({}) => {
        try {
          const address = await rgbClient.generateAddress();
          return { content: [{ type: 'text', text: JSON.stringify(address, null, 2) }] };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : String(error);
          return { content: [{ type: 'text', text: `Error: ${errorMessage}` }], isError: true };
        }
      }
    );
  • Helper method in RGBApiClientWrapper that wraps the underlying SDK's onchain.getAddress() call.
    async generateAddress() {
      return await this.client.onchain.getAddress();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'generate a new on-chain address' but doesn't clarify if this is a read-only operation, if it requires authentication, what network it applies to, or if there are rate limits. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no wasted words, making it highly concise and front-loaded. It directly communicates the core action without unnecessary elaboration, which is efficient for an AI agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of blockchain address generation, the lack of annotations and output schema means the description is incomplete. It doesn't explain what the generated address is for (e.g., RGB assets, Bitcoin), the format of the output, or any prerequisites, leaving the agent with insufficient context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here, but it could briefly mention that no inputs are required. Baseline is 4 for 0 parameters, as the schema fully covers the absence of inputs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'generate' and the resource 'new on-chain address', making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'rgb_send_bitcoin' or 'rgb_send_assets' which might also involve addresses, leaving room for improvement in sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, such as whether it's for receiving assets versus sending, or if it's specific to certain asset types. Without any context or exclusions, the agent must infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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