Skip to main content
Glama
dasein108

Cyb MCP Server

by dasein108

sendCyberlink

Create connections between IPFS content identifiers on the Cyber network to establish semantic relationships in the decentralized knowledge graph.

Instructions

Create a cyberlink between two IPFS CIDs on the Cyber network

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYesSource CID or text (will be converted to CID if not a valid CID)
toYesTarget CID or text (will be converted to CID if not a valid CID)
feeNoTransaction fee (optional)

Implementation Reference

  • The core implementation of the sendCyberlink tool. Handles input validation, CID conversion, wallet signing, and transaction submission via the CyberClient's cyberlink method.
    private async handleSendCyberlink(args: {
      from: string;
      to: string;
      fee?: any;
    }) {
      try {
        // Check if wallet is initialized
        if (!this.wallet.isInitialized()) {
          return {
            content: [
              {
                type: 'text',
                text: 'Error: No mnemonic provided. The sendCyberlink tool requires a wallet to sign transactions. Please provide CYBER_MNEMONIC in your environment variables.',
              },
            ],
            isError: true,
          };
        }
    
        // Convert to CIDs if necessary
        const fromCid = isValidCID(args.from) ? args.from : await getIpfsHash(args.from);
        const toCid = isValidCID(args.to) ? args.to : await getIpfsHash(args.to);
    
        const signingClient = this.wallet.getSigningClient();
        const address = this.wallet.getAddress();
    
        const fee = args.fee || {
          amount: [{ denom: BASE_DENOM, amount: '0' }],
          gas: '200000',
        };
    
        const result = await signingClient.cyberlink(
          address,
          fromCid,
          toCid,
          fee
        );
    
        return {
          content: [
            {
              type: 'text',
              text: `Cyberlink created successfully!\nTransaction Hash: ${Array.isArray(result) ? 'Multiple transactions' : (result as any).transactionHash || 'Unknown'}\nFrom: ${fromCid}\nTo: ${toCid}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error creating cyberlink: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Input schema for the sendCyberlink tool, specifying required 'from' and 'to' CIDs/texts and optional fee structure.
    inputSchema: {
      type: 'object',
      properties: {
        from: {
          type: 'string',
          description: 'Source CID or text (will be converted to CID if not a valid CID)',
        },
        to: {
          type: 'string',
          description: 'Target CID or text (will be converted to CID if not a valid CID)',
        },
        fee: {
          type: 'object',
          description: 'Transaction fee (optional)',
          properties: {
            amount: {
              type: 'array',
              items: {
                type: 'object',
                properties: {
                  denom: { type: 'string' },
                  amount: { type: 'string' },
                },
              },
            },
            gas: { type: 'string' },
          },
          default: {
            amount: [{ denom: BASE_DENOM, amount: '0' }],
            gas: '200000',
          },
        },
      },
      required: ['from', 'to'],
    },
  • src/index.ts:50-88 (registration)
    Registration of the sendCyberlink tool in the listTools handler, providing name, description, and input schema.
    {
      name: 'sendCyberlink',
      description: 'Create a cyberlink between two IPFS CIDs on the Cyber network',
      inputSchema: {
        type: 'object',
        properties: {
          from: {
            type: 'string',
            description: 'Source CID or text (will be converted to CID if not a valid CID)',
          },
          to: {
            type: 'string',
            description: 'Target CID or text (will be converted to CID if not a valid CID)',
          },
          fee: {
            type: 'object',
            description: 'Transaction fee (optional)',
            properties: {
              amount: {
                type: 'array',
                items: {
                  type: 'object',
                  properties: {
                    denom: { type: 'string' },
                    amount: { type: 'string' },
                  },
                },
              },
              gas: { type: 'string' },
            },
            default: {
              amount: [{ denom: BASE_DENOM, amount: '0' }],
              gas: '200000',
            },
          },
        },
        required: ['from', 'to'],
      },
    },
  • src/index.ts:140-141 (registration)
    Dispatch registration in the CallToolRequestSchema handler, routing 'sendCyberlink' calls to the handler function.
    case 'sendCyberlink':
      return await this.handleSendCyberlink(args as any);
  • Configuration interface noting that mnemonic is required specifically for the sendCyberlink tool.
    mnemonic?: string; // Optional - only needed for sendCyberlink
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it indicates this is a creation operation (implying a write/mutation), it doesn't specify whether this requires authentication, has rate limits, is reversible, or what happens on success/failure. For a tool that likely modifies network state, this lack of detail is a significant gap.

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 that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the key action ('Create a cyberlink') and avoids redundancy, making it easy to parse quickly.

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 (a network write operation with 3 parameters, nested objects, and no output schema), the description is insufficient. It lacks details on behavioral aspects like authentication, error handling, or return values, and doesn't leverage context from siblings. For a tool that likely has significant side effects, more completeness is needed.

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 schema already documents all parameters ('from', 'to', 'fee') thoroughly. The description adds no additional parameter semantics beyond implying that inputs can be CIDs or text, which is already covered in the schema descriptions. 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 ('Create a cyberlink') and the resources involved ('between two IPFS CIDs on the Cyber network'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'getCyberlink' (which presumably retrieves cyberlinks) or 'searchQuery' (which likely searches for content), leaving some ambiguity about when to choose this tool over alternatives.

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 its siblings ('getCyberlink' and 'searchQuery'). It doesn't mention prerequisites, such as needing valid CIDs or network access, or any context-specific recommendations. Without this, users 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/dasein108/cyb-mcp'

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