Skip to main content
Glama
warengonzaga

Relay Protocol MCP Server

by warengonzaga

relay_transactions_index

Notify Relay backend of a transaction to enable cross-chain tracking and status monitoring. Provide transaction hash and chain ID after sending a deposit transaction for proper request linking.

Instructions

Notify the Relay backend about a transaction. This is used to index and track transactions for cross-chain operations.

When to use: • After executing a transaction from a quote response • When you want Relay to track a specific transaction • For proper status monitoring and request linking

Example: After sending the deposit transaction from relay_get_quote response, call this tool with the transaction hash and chain ID to enable proper tracking.

Required: txHash (0x...), chainId (number) Optional: requestId (from quote response for linking)

Input Schema

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

Implementation Reference

  • The handler function for relay_transactions_index. It validates arguments with the Zod schema and calls client.indexTransaction() to notify the Relay backend.
    handler: async (args: unknown) => {
      const params = transactionIndexSchema.parse(args);
      return await client.indexTransaction(params);
    },
  • Zod input validation schema for relay_transactions_index, defining required txHash, chainId, and optional requestId fields.
    const transactionIndexSchema = z.object({
      txHash: z.string().describe('Transaction hash to index'),
      chainId: z.string().describe('Chain ID where the transaction occurred'),
      requestId: z.string().optional().describe('Optional request ID to associate with the transaction'),
    });
  • The JSON Schema input schema (inputSchema) for MCP tool registration, defining the expected parameters.
    inputSchema: {
      type: 'object',
      properties: {
        txHash: {
          type: 'string',
          description: 'Transaction hash to index'
        },
        chainId: {
          type: 'string',
          description: 'Chain ID where the transaction occurred (as string, e.g., "1" for Ethereum, "10" for Optimism)'
        },
        requestId: {
          type: 'string',
          description: 'Optional request ID to associate with the transaction'
        }
      },
      required: ['txHash', 'chainId'],
      additionalProperties: false
  • Registration of the relay_transactions_index tool within the createTransactionTools function, defining its name and description.
    relay_transactions_index: {
      name: 'relay_transactions_index',
  • The RelayClient helper method that makes the actual API POST request to /transactions/index endpoint.
    async indexTransaction(request: TransactionIndexRequest): Promise<{ message: string }> {
      const response = await this.client.post<{ message: string }>('/transactions/index', request);
      return response.data;
    }
Behavior2/5

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

With no annotations, the description carries full burden. It does not disclose whether the tool is destructive, idempotent, or requires special permissions, nor does it mention potential side effects or error conditions.

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 well-organized with section headers, bullet points, and a concrete example. Every sentence adds value and no unnecessary text is present.

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 parameters well, it lacks information about return values and error handling. Given no output schema, the agent might need more context on what to expect from the tool.

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?

Schema coverage is 100%, but the description adds context beyond the schema (e.g., example format for txHash, explanation of requestId linking). This helps the agent understand parameter usage 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 tool's purpose ('Notify the Relay backend about a transaction') and its use for indexing and tracking transactions. It distinguishes from siblings by focusing on post-execution notification.

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

Usage Guidelines4/5

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

The description provides explicit 'when to use' bullet points and an example, but does not include when not to use or mention alternative tools.

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