Skip to main content
Glama

sodax_get_transaction

Read-only

Look up a transaction by hash to view its status, amounts, and details from the SODAX cross-chain API.

Instructions

Look up a specific transaction by its hash to see status, amounts, and details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txHashYesThe transaction hash to look up (e.g., '0x...')
formatNoResponse format: 'json' for raw data or 'markdown' for formatted textmarkdown

Implementation Reference

  • The core implementation that fetches transaction data from the SODAX API endpoint /intent/tx/{txHash}. Returns Transaction or null (if 404).
    export async function getTransaction(txHash: string): Promise<Transaction | null> {
      try {
        const response = await apiClient.get(`/intent/tx/${txHash}`);
        return response.data?.data || response.data || null;
      } catch (error) {
        if (axios.isAxiosError(error) && error.response?.status === 404) {
          return null;
        }
        console.error("Error fetching transaction:", error);
        throw new Error("Failed to fetch transaction from SODAX API");
      }
    }
  • Registers the 'sodax_get_transaction' tool on the MCP server with input schema (txHash, format) and handler that calls getTransaction().
    // Tool 3: Get Transaction
    server.tool(
      "sodax_get_transaction",
      "Look up a specific transaction by its hash to see status, amounts, and details",
      {
        txHash: z.string()
          .describe("The transaction hash to look up (e.g., '0x...')"),
        format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
          .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
      },
      READ_ONLY,
      async ({ txHash, format }) => {
        try {
          const transaction = await getTransaction(txHash);
          if (!transaction) {
            return {
              content: [{ type: "text", text: `Transaction not found: ${txHash}` }]
            };
          }
          return {
            content: [{
              type: "text",
              text: `## Transaction Details\n\n${formatResponse(transaction, format)}`
            }]
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }],
            isError: true
          };
        }
      }
    );
  • Input schema for the tool: txHash (string) and optional format (ResponseFormat enum with default Markdown), validated with Zod.
    "sodax_get_transaction",
    "Look up a specific transaction by its hash to see status, amounts, and details",
    {
      txHash: z.string()
        .describe("The transaction hash to look up (e.g., '0x...')"),
      format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
        .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
    },
  • API drift check mapping: tool 'sodax_get_transaction' corresponds to GET /intent/tx/:txHash with required param txHash and expected response fields.
    "GET /intent/tx/:txHash": {
      tool: "sodax_get_transaction",
      params: ["txHash"],
      requiredParams: ["txHash"],
      responseFields: ["intentHash", "txHash", "logIndex", "chainId", "blockNumber", "open", "intent", "events"],
    },
  • Analytics mapping: sodax_get_transaction is categorized as an 'api' tool for tracking purposes.
    sodax_get_transaction: "api",
    sodax_get_user_transactions: "api",
Behavior3/5

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

Annotations already declare readOnlyHint=true, and the description confirms a read operation ('look up'). It adds that the tool returns status, amounts, and details, providing some behavioral context beyond annotations, but not extensive.

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 sentence with 14 words, no repetition or fluff, and immediately states the purpose. It is optimally concise and front-loaded.

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?

For a simple read tool with two well-documented parameters and no output schema, the description sufficiently conveys the tool's purpose and return information (status, amounts, details), though it could be slightly more specific about what 'details' entails.

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?

Input schema has 100% description coverage for both parameters, so the description adds no additional meaning beyond what the schema provides. Baseline 3 is appropriate.

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 explicitly states the action ('look up'), the resource ('specific transaction by its hash'), and the information returned ('status, amounts, and details'), clearly distinguishing it from sibling tools like sodax_get_user_transactions.

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

Usage Guidelines3/5

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

The description indicates the tool is for looking up a single transaction by hash, but does not provide explicit guidance on when to use this vs. alternatives (e.g., sodax_get_user_transactions) or when not to use it.

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/gosodax/builders-sodax-mcp-server'

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