Skip to main content
Glama
warengonzaga

Relay Protocol MCP Server

by warengonzaga

relay_transactions_single

Index specific transfers, wraps, and unwraps from a single transaction by submitting a request ID, chain ID, and transaction hash.

Instructions

Notify the Relay backend to index transfers, wraps and unwraps for a specific transaction.

When to use: • Index specific transfers within a transaction • Track wrap/unwrap operations • Associate transaction data with a request ID

Difference from relay_transactions_index: • This is for indexing specific transfers/wraps/unwraps • relay_transactions_index is for general transaction tracking

Required: requestId, chainId (string), tx (transaction hash)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYesRequest ID to associate with the transaction
chainIdYesChain ID where the transaction occurred (as string, e.g., "1" for Ethereum, "10" for Optimism)
txYesTransaction hash to index (0x...)

Implementation Reference

  • The handler function for relay_transactions_single tool. It parses args with the schema and calls client.indexTransactionSingle(params).
    handler: async (args: unknown) => {
      const params = transactionSingleSchema.parse(args);
      return await client.indexTransactionSingle(params);
    },
  • Zod schema (transactionSingleSchema) for validating single transaction indexing parameters: requestId, chainId, and tx.
    const transactionSingleSchema = z.object({
      requestId: z.string().describe('Request ID to associate with the transaction'),
      chainId: z.string().describe('Chain ID where the transaction occurred'),
      tx: z.string().describe('Transaction hash or transaction data'),
    });
  • The tool registration block for relay_transactions_single, defining name, description, inputSchema, and the handler.
    relay_transactions_single: {
      name: 'relay_transactions_single',
      description: 'Notify the Relay backend to index transfers, wraps and unwraps for a specific transaction.\n\nWhen to use:\n• Index specific transfers within a transaction\n• Track wrap/unwrap operations\n• Associate transaction data with a request ID\n\nDifference from relay_transactions_index:\n• This is for indexing specific transfers/wraps/unwraps\n• relay_transactions_index is for general transaction tracking\n\nRequired: requestId, chainId (string), tx (transaction hash)',
      inputSchema: {
        type: 'object',
        properties: {
          requestId: {
            type: 'string',
            description: 'Request ID to associate with the transaction'
          },
          chainId: {
            type: 'string',
            description: 'Chain ID where the transaction occurred (as string, e.g., "1" for Ethereum, "10" for Optimism)'
          },
          tx: {
            type: 'string',
            description: 'Transaction hash to index (0x...)'
          }
        },
        required: ['requestId', 'chainId', 'tx'],
        additionalProperties: false
      },
      /**
       * Handler function for the relay_transactions_single tool.
       * 
       * @param {unknown} args - Raw arguments from MCP client
       * @returns {Promise<{message: string}>} Confirmation message from the backend
       * @throws {ZodError} When arguments don't match the expected schema
       * @throws {RelayAPIError} When transaction data is invalid or backend error occurs
       */
      handler: async (args: unknown) => {
        const params = transactionSingleSchema.parse(args);
        return await client.indexTransactionSingle(params);
      },
    },
  • The RelayClient.indexTransactionSingle method that makes the actual POST /transactions/single API call.
    async indexTransactionSingle(request: TransactionSingleRequest): Promise<{ message: string }> {
      const response = await this.client.post<{ message: string }>('/transactions/single', request);
      return response.data;
    }
  • TypeScript interface TransactionSingleRequest defining the shape of the request object (requestId, chainId, tx).
    export interface TransactionSingleRequest {
      /** Request ID to associate with the transaction */
      requestId: string;
      /** Chain ID where the transaction occurred */
      chainId: string;
      /** Transaction hash */
      tx: string;
    }
Behavior4/5

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

The description implies a mutation (indexing) and lists all required parameters. However, it does not disclose side effects, idempotency, or error handling. With no annotations, it carries the burden but falls slightly short of full transparency.

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

Conciseness4/5

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

The description is well-structured with a clear purpose sentence followed by bullet points. It is concise but the repeated required fields line is slightly redundant given the schema.

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

Completeness3/5

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

While the description covers usage and differentiation, it omits details about the return value or what happens after indexing (e.g., no output schema). For a 3-parameter tool with high schema coverage, this is adequate but not complete.

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 coverage is 100%, so baseline is 3. The description repeats parameter names and requirements (e.g., 'Required: requestId, chainId, tx') but adds minimal new semantic value beyond explaining their role in context.

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

Purpose5/5

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

The description clearly states the verb 'Notify...to index' and specifies the resource: transfers, wraps, and unwraps. It distinguishes from the sibling relay_transactions_index, making the purpose unambiguous.

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

Usage Guidelines5/5

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

Provides explicit 'When to use' bullet points and a 'Difference from relay_transactions_index' section, offering clear guidance on context and alternatives.

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/warengonzaga/relay-protocol-mcp-server'

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