Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_sign_message

Sign messages using the RGB node to verify authenticity and ownership of RGB assets on the Lightning Network.

Instructions

Sign a message with the RGB node

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to sign

Implementation Reference

  • src/server.ts:269-284 (registration)
    Registration of the rgb_sign_message MCP tool, including input schema (message: string) and inline handler that delegates to rgbClient.signMessage() and handles response/error formatting.
    server.tool(
      'rgb_sign_message',
      'Sign a message with the RGB node',
      {
        message: z.string().describe('The message to sign'),
      },
      async ({ message }) => {
        try {
          const result = await rgbClient.signMessage(message);
          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 };
        }
      }
    );
  • Inline handler function for the rgb_sign_message tool.
    async ({ message }) => {
      try {
        const result = await rgbClient.signMessage(message);
        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 };
      }
    }
  • Zod input schema for the tool: message as string.
      message: z.string().describe('The message to sign'),
    },
  • Helper method in RGBApiClientWrapper that wraps the external SDK's node.signMessage method.
    async signMessage(message: string) {
      return await this.client.node.signMessage({ message });
    }
  • TypeScript interface for the expected output of signMessage.
    export interface SignMessageResult {
      signature: string;
      [key: string]: any;
    }
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 mentions signing but doesn't clarify if this is a read-only operation, what cryptographic algorithm is used, whether it requires specific permissions, or what the output format is (e.g., a signature string). For a cryptographic tool with zero annotation coverage, this leaves significant gaps in understanding its 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, efficient sentence with zero wasted words. It's front-loaded with the core action ('Sign a message') and includes essential context ('with the RGB node'). Every part of the sentence earns its place by specifying the tool's purpose.

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 cryptographic signing, no annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., a signature), potential errors, or security implications. For a tool that likely produces a critical output for blockchain operations, more context is needed to use it effectively.

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

Parameters3/5

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

The input schema has 100% description coverage, with the 'message' parameter clearly documented as 'The message to sign'. The description doesn't add any extra semantic context beyond this (e.g., format constraints or examples). According to the rules, with high schema coverage, the baseline is 3 even without additional param info in the description.

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 action ('Sign') and the resource ('a message'), specifying it's done 'with the RGB node'. It distinguishes from siblings like rgb_send_assets or rgb_pay_lightning_invoice by focusing on cryptographic signing rather than asset transfers or payments. However, it doesn't explicitly differentiate from all siblings (e.g., rgb_decode_lightning_invoice also involves message processing).

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an initialized RGB node), exclusions, or related tools like rgb_send_assets for signed transactions. The description only states what it does, not when it's appropriate.

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