Skip to main content
Glama
lnfi-network

RGB Lightning Network MCP Server

by lnfi-network

rgb_send_assets

Send RGB assets to multiple recipients by specifying asset IDs and corresponding recipient addresses with amounts. This tool facilitates asset transfers within the RGB Lightning Network ecosystem.

Instructions

Send RGB assets to recipients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
recipientMapYesMap of asset IDs to recipient/amount pairs

Implementation Reference

  • src/server.ts:84-102 (registration)
    Registration of the 'rgb_send_assets' MCP tool, including input schema (recipientMap as record of assetId to array of recipient/amount objects) and handler function that delegates to rgbClient.sendAssets()
    server.tool(
      'rgb_send_assets',
      'Send RGB assets to recipients',
      {
        recipientMap: z.record(z.string(), z.array(z.object({
          recipient: z.string().describe('The recipient address'),
          amount: z.number().describe('The amount to send'),
        }))).describe('Map of asset IDs to recipient/amount pairs'),
      },
      async ({ recipientMap }) => {
        try {
          const result = await rgbClient.sendAssets(recipientMap);
          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 };
        }
      }
    );
  • MCP tool handler: receives recipientMap, calls rgbClient.sendAssets(recipientMap), returns JSON stringified result or error
    async ({ recipientMap }) => {
      try {
        const result = await rgbClient.sendAssets(recipientMap);
        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 recipientMap: object mapping asset IDs (string) to arrays of {recipient: string, amount: number}
    {
      recipientMap: z.record(z.string(), z.array(z.object({
        recipient: z.string().describe('The recipient address'),
        amount: z.number().describe('The amount to send'),
      }))).describe('Map of asset IDs to recipient/amount pairs'),
    },
  • Wrapper method in RGBApiClientWrapper: forwards recipientMap to underlying SDK's rgb.sendAssets with {recipient_map}
    async sendAssets(recipientMap: any) {
      return await this.client.rgb.sendAssets({ recipient_map: recipientMap });
    }
  • TypeScript interface defining the structure of SendAssetsParams matching the tool input schema
    export interface SendAssetsParams {
      recipient_map: {
        [assetId: string]: Array<{
          recipient: string;
          amount: number;
        }>;
      };
    }
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 'Send RGB assets' which implies a write/mutation operation, but fails to mention critical details like transaction finality, confirmation requirements, error handling, or rate limits. This is inadequate for a tool that likely involves irreversible transfers.

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 extremely concise with just four words, front-loading the core purpose without any wasted text. Every word earns its place, making it efficient for quick understanding.

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 sending assets (a mutation with financial implications), no annotations, and no output schema, the description is insufficient. It lacks details on behavior, error cases, return values, and differentiation from siblings, leaving the agent with significant gaps in understanding how to use this tool safely and 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?

Schema description coverage is 100%, so the input schema fully documents the single parameter 'recipientMap'. The description adds no additional meaning about parameters beyond what the schema provides, such as format examples or constraints. This meets the baseline for high schema coverage.

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 ('Send') and resource ('RGB assets to recipients'), making the purpose understandable. However, it doesn't distinguish this tool from sibling tools like 'rgb_send_bitcoin', which also sends assets but of a different type.

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 like 'rgb_send_bitcoin' or 'rgb_pay_lightning_invoice'. The description lacks context about prerequisites, such as needing asset balances or network connectivity, which is a significant gap for a financial transaction tool.

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