Skip to main content
Glama
RWAValueRouter

ValueRouter MCP Server

get_transaction_status

Check the status of cross-chain USDC bridge transactions across multiple blockchain networks using transaction hash and chain IDs.

Instructions

Get the status of a bridge transaction

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionHashYesTransaction hash to check status for
fromChainIdYesSource chain ID
toChainIdYesDestination chain ID

Implementation Reference

  • Core handler function implementing the logic to fetch transaction status from source chain, handle simulated transactions, query bridge status, and return formatted TransactionStatus.
    async getTransactionStatus(
      transactionHash: string,
      fromChainId: SupportedChainId,
      toChainId: SupportedChainId
    ): Promise<TransactionStatus> {
      const fromChainIdTyped = fromChainId as SupportedChainId;
      const toChainIdTyped = toChainId as SupportedChainId;
    
      try {
        // Get transaction details from source chain
        const sourceTransaction = await this.getSourceTransactionDetails(
          transactionHash,
          fromChainIdTyped
        );
    
        // Check if this is a simulated transaction
        if (transactionHash.startsWith('simulated-')) {
          return this.getSimulatedTransactionStatus(
            transactionHash,
            fromChainIdTyped,
            toChainIdTyped
          );
        }
    
        // Get bridge transaction status
        const bridgeStatus = await this.getBridgeTransactionStatus(
          transactionHash,
          fromChainIdTyped,
          toChainIdTyped
        );
    
        return bridgeStatus;
      } catch (error) {
        return {
          transactionHash,
          fromChainId: fromChainIdTyped,
          toChainId: toChainIdTyped,
          status: 'failed',
          steps: [
            {
              name: 'Transaction Query',
              status: 'failed',
              timestamp: Date.now(),
            },
          ],
          errorMessage: error instanceof Error ? error.message : String(error),
        };
      }
    }
  • src/index.ts:237-264 (registration)
    Registration of the get_transaction_status tool in the MCP server's tool list, including description and input schema.
      name: 'get_transaction_status',
      description: 'Get the status of a bridge transaction',
      inputSchema: {
        type: 'object',
        properties: {
          transactionHash: {
            type: 'string',
            description: 'Transaction hash to check status for',
          },
          fromChainId: {
            oneOf: [
              { type: 'number' },
              { type: 'string' },
            ],
            description: 'Source chain ID',
          },
          toChainId: {
            oneOf: [
              { type: 'number' },
              { type: 'string' },
            ],
            description: 'Destination chain ID',
          },
        },
        required: ['transactionHash', 'fromChainId', 'toChainId'],
        additionalProperties: false,
      },
    },
  • MCP server-side handler that processes tool call arguments, delegates to StatusService, and formats the response.
    private async getTransactionStatus(args: any): Promise<MCPToolResult> {
      try {
        const { transactionHash, fromChainId, toChainId } = args;
        const result = await this.statusService.getTransactionStatus(
          transactionHash,
          fromChainId,
          toChainId
        );
        return createSuccessResponse(result);
      } catch (error) {
        return createErrorResponse(
          error instanceof Error ? error.message : String(error),
          'STATUS_ERROR'
        );
      }
    }
  • Input schema definition for the get_transaction_status tool validating transactionHash, fromChainId, and toChainId.
    inputSchema: {
      type: 'object',
      properties: {
        transactionHash: {
          type: 'string',
          description: 'Transaction hash to check status for',
        },
        fromChainId: {
          oneOf: [
            { type: 'number' },
            { type: 'string' },
          ],
          description: 'Source chain ID',
        },
        toChainId: {
          oneOf: [
            { type: 'number' },
            { type: 'string' },
          ],
          description: 'Destination chain ID',
        },
      },
      required: ['transactionHash', 'fromChainId', 'toChainId'],
      additionalProperties: false,
    },
  • Helper function that generates simulated bridge transaction status with progress steps.
    private async getBridgeTransactionStatus(
      transactionHash: string,
      fromChainId: SupportedChainId,
      toChainId: SupportedChainId
    ): Promise<TransactionStatus> {
      // This would typically query the bridge service API
      // For now, we'll simulate the bridge status
    
      const steps = [
        {
          name: 'Source Transaction',
          status: 'completed' as const,
          transactionHash,
          timestamp: Date.now() - 300000, // 5 minutes ago
        },
        {
          name: 'Bridge Scanning',
          status: 'completed' as const,
          timestamp: Date.now() - 240000, // 4 minutes ago
        },
        {
          name: 'Circle Attestation',
          status: 'completed' as const,
          timestamp: Date.now() - 180000, // 3 minutes ago
        },
        {
          name: 'Destination Minting',
          status: 'processing' as const,
          timestamp: Date.now() - 60000, // 1 minute ago
        },
      ];
    
      return {
        transactionHash,
        fromChainId,
        toChainId,
        status: 'attesting',
        steps,
        fromTxHash: transactionHash,
        toTxHash: undefined, // Will be populated when minting completes
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but provides minimal information. It doesn't indicate whether this is a read-only operation, what authentication might be required, potential rate limits, or what happens with invalid transaction hashes. The description states what the tool does but not how it behaves.

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, efficient sentence that states the core purpose without any fluff. It's appropriately sized for a simple status-checking tool and gets straight to the point. Every word earns its place in conveying the essential function.

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?

For a bridge transaction status tool with no annotations and no output schema, the description is insufficient. It doesn't explain what status information will be returned, potential error conditions, or how this integrates with the bridge workflow. Given the complexity of blockchain bridging and the lack of structured output documentation, more context 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?

With 100% schema description coverage, all three parameters are already documented in the schema. The description doesn't add any additional context about parameter relationships, constraints, or usage patterns beyond what's in the schema. The baseline score of 3 reflects adequate but not enhanced parameter documentation.

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 verb ('Get') and resource ('status of a bridge transaction'), making the purpose immediately understandable. However, it doesn't distinguish this tool from potential sibling tools like 'get_bridge_quote' or 'estimate_bridge_fees' - it's clear what it does but not how it differs from related status-checking tools.

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 alternatives. With sibling tools like 'get_bridge_quote', 'estimate_bridge_fees', and 'execute_bridge', there's no indication whether this should be used before, after, or instead of those operations. No prerequisites or context for usage are mentioned.

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/RWAValueRouter/MCP'

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