Skip to main content
Glama
warengonzaga

Relay Protocol MCP Server

by warengonzaga

relay_get_execution_status

Check the execution status of a cross-chain request using its requestId. Returns status, transaction hash, and details to monitor progress after executing a quote or swap.

Instructions

Get the current execution status of a cross-chain request. Returns status, transaction hash, and other execution details.

When to use: After executing a quote/swap, use the requestId from the response to monitor progress. Request ID format: Hex string starting with "0x" (e.g., "0x1234abcd...") Status values: "pending", "success", "failed", "insufficient-balance"

Example workflow: relay_get_quote → get requestId → relay_get_execution_status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYesThe ID of the cross-chain request to check status for

Implementation Reference

  • Handler function for relay_get_execution_status. Parses arguments with Zod schema and delegates to client.getExecutionStatus(requestId).
    handler: async (args: unknown) => {
      const { requestId } = getExecutionStatusSchema.parse(args);
      return await client.getExecutionStatus(requestId);
    },
  • Zod input validation schema for relay_get_execution_status. Expects a single 'requestId' string parameter.
    const getExecutionStatusSchema = z.object({
      requestId: z.string().describe('The ID of the cross-chain request to check status for'),
    });
  • Tool registration object with name, description, inputSchema (JSON Schema), and handler. Defined inside createRequestTools() function.
    relay_get_execution_status: {
      name: 'relay_get_execution_status',
      description: 'Get the current execution status of a cross-chain request. Returns status, transaction hash, and other execution details.\n\nWhen to use: After executing a quote/swap, use the requestId from the response to monitor progress.\nRequest ID format: Hex string starting with "0x" (e.g., "0x1234abcd...")\nStatus values: "pending", "success", "failed", "insufficient-balance"\n\nExample workflow: relay_get_quote → get requestId → relay_get_execution_status',
      inputSchema: {
        type: 'object',
        properties: {
          requestId: {
            type: 'string',
            description: 'The ID of the cross-chain request to check status for'
          }
        },
        required: ['requestId'],
        additionalProperties: false
      },
      /**
       * Handler function for the relay_get_execution_status tool.
       * 
       * @param {unknown} args - Raw arguments from MCP client
       * @returns {Promise<ExecutionStatus>} Current execution status and details
       * @throws {ZodError} When arguments don't match the expected schema
       * @throws {RelayAPIError} When request ID is invalid or not found
       */
      handler: async (args: unknown) => {
        const { requestId } = getExecutionStatusSchema.parse(args);
        return await client.getExecutionStatus(requestId);
      },
    },
  • Client method that makes the actual HTTP GET request to /intents/status/v2 endpoint with the requestId parameter. Returns typed ExecutionStatus response.
    async getExecutionStatus(requestId: string): Promise<ExecutionStatus> {
      const response = await this.client.get<ExecutionStatus>('/intents/status/v2', {
        params: { requestId }
      });
      return response.data;
    }
  • TypeScript interface defining the response shape returned by getExecutionStatus. Contains status enum, transaction hashes, timestamps, and chain IDs.
    export interface ExecutionStatus {
      /** Current status of the execution */
      status: 'refund' | 'delayed' | 'waiting' | 'failure' | 'pending' | 'success';
      /** Additional status details if available */
      details?: string;
      /** Array of input transaction hashes */
      inTxHashes: string[];
      /** Array of output transaction hashes */
      txHashes: string[];
      /** Timestamp of last status update */
      time: number;
      /** Source chain ID */
      originChainId: number;
      /** Destination chain ID */
      destinationChainId: number;
    }
Behavior4/5

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

No annotations, but description explains returns (status, tx hash) and lists possible status values. Transparent about being a read-only status check.

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?

Very concise: single sentence for purpose, then bullet-like structured info. No wasted words.

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

Completeness4/5

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

Covers purpose, usage context, status values, and example workflow. Lacks output schema but mentions key return fields. Adequate for a simple status polling 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 has 100% coverage; description adds format (0x hex string) beyond schema's description, aiding correct invocation.

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?

Clearly states the tool gets execution status of a cross-chain request. Differentiates from siblings (quote, chains, etc.) by focusing on status after execution.

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?

Explicitly says when to use (after executing quote/swap with requestId). Provides example workflow. Lacks explicit when-not-to-use, but context is clear.

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