Skip to main content
Glama

sodax_get_intent

Read-only

Query a specific cross-chain intent using its intent hash. Returns details in JSON or markdown format.

Instructions

Look up a specific intent by its intent hash (different from transaction hash)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
intentHashYesThe intent hash to look up (66 character hex string starting with 0x)
formatNoResponse format: 'json' for raw data or 'markdown' for formatted textmarkdown

Implementation Reference

  • MCP tool handler for 'sodax_get_intent'. Registers the tool with Zod schema for intentHash (required) and format (optional, default markdown). Calls getIntent() service and formats response.
    // Tool 19: Get Intent by Hash
    server.tool(
      "sodax_get_intent",
      "Look up a specific intent by its intent hash (different from transaction hash)",
      {
        intentHash: z.string()
          .describe("The intent hash to look up (66 character hex string starting with 0x)"),
        format: z.nativeEnum(ResponseFormat).optional().default(ResponseFormat.MARKDOWN)
          .describe("Response format: 'json' for raw data or 'markdown' for formatted text")
      },
      READ_ONLY,
      async ({ intentHash, format }) => {
        try {
          const intent = await getIntent(intentHash);
          if (!intent) {
            return {
              content: [{ type: "text", text: `Intent not found: ${intentHash}` }]
            };
          }
          return {
            content: [{
              type: "text",
              text: `## Intent Details\n\n` + formatResponse(intent, format)
            }]
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : "Unknown error"}` }],
            isError: true
          };
        }
      }
    );
  • Service function getIntent() that makes the actual HTTP GET /intent/{intentHash} API call to the SODAX API and returns the response data.
    /**
     * Look up an intent by its intent hash (not tx hash)
     */
    export async function getIntent(intentHash: string): Promise<unknown> {
      try {
        const response = await apiClient.get(`/intent/${intentHash}`);
        return response.data?.data || response.data || null;
      } catch (error) {
        if (axios.isAxiosError(error) && error.response?.status === 404) {
          return null;
        }
        console.error("Error fetching intent:", error);
        throw new Error("Failed to fetch intent from SODAX API");
      }
    }
  • src/index.ts:44-48 (registration)
    Registration entry point: registerSodaxApiTools(server) is called when creating the MCP server, which registers all SODAX API tools including sodax_get_intent.
      registerSodaxApiTools(server);
      await registerGitBookProxyTools(server);
    
      return server;
    }
  • API drift check schema mapping: defines GET /intent/:intentHash endpoint maps to tool 'sodax_get_intent', with params/requiredParams/responseFields for validation.
    "GET /intent/:intentHash": {
      tool: "sodax_get_intent",
      params: ["intentHash"],
      requiredParams: ["intentHash"],
      responseFields: ["intentHash", "txHash", "logIndex", "chainId", "blockNumber", "open", "intent", "events"],
    },
  • Analytics configuration: maps sodax_get_intent to 'api' category for PostHog tracking.
    sodax_get_intent: "api",
Behavior3/5

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

Annotations already declare readOnlyHint and destructiveHint, so the description's behavioral contribution is minimal. It adds that the tool looks up by intent hash, which is consistent and slightly extends the context.

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, front-loaded sentence with no extraneous information. Every word serves a purpose: verb, resource, key identifier, and disambiguation.

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

Completeness5/5

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

Given the tool's simplicity (2 params, read-only, no output schema), the description is sufficient. It clearly states the purpose and distinguishes it from related tools, without needing further detail.

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% with descriptions for both parameters. The description adds a key differentiator (intent hash vs transaction hash) but does not significantly enhance parameter understanding beyond the schema.

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 uses a specific verb ('Look up') and resource ('intent by its intent hash'), and explicitly distinguishes it from transaction hash, clarifying its unique role among siblings like sodax_get_transaction.

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 clear context by noting the intent hash is different from a transaction hash, implying when not to use it. However, it does not explicitly name the alternative tool (sodax_get_transaction) for transaction lookups.

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