Skip to main content
Glama
clawallex

Clawallex MCP Server

by clawallex

get_x402_payee_address

Retrieve the receiving address for on-chain x402 payments to use in payment requirements before Mode B Refill. Specify chain and token codes like BASE/USDC or ETH/USDC.

Instructions

Get the system receiving address for x402 on-chain payments.

When to use: MUST call this before Mode B Refill to obtain payee_address for payment_requirements.payTo. Not needed for Mode B card creation — the 402 quote response already includes payee_address.

Common chain + token combinations: BASE + USDC, ETH + USDC. If this returns 404: the payee address for this chain/token is not initialized — try a different chain or contact support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chain_codeYesChain code, e.g. 'ETH', 'BASE'
token_codeYesToken code, e.g. 'USDC'

Implementation Reference

  • The handler function for get_x402_payee_address which calls the /payment/x402/payee-address API endpoint.
    async ({ chain_code, token_code }) => {
      try {
        const result = await client.get<X402PayeeAddress>("/payment/x402/payee-address", {
          chain_code,
          token_code,
        });
        return toolOk(result);
      } catch (err) {
        if (err instanceof ClawallexApiError && err.statusCode === 404) {
          return {
            content: [{ type: "text" as const, text:
              `No payee address found for ${chain_code} + ${token_code}. ` +
              "The payee address for this chain/token combination has not been initialized. " +
              "Common combinations: ETH + USDC. " +
              "Contact support to enable this chain."
            }],
            isError: true as const,
          };
        }
        return toolError(err);
      }
    },
  • Input schema for get_x402_payee_address.
    {
      chain_code: z.string().describe("Chain code, e.g. 'ETH', 'BASE'"),
      token_code: z.string().describe("Token code, e.g. 'USDC'"),
    },
  • Registration of the get_x402_payee_address tool within the MCP server.
    server.tool(
      "get_x402_payee_address",
      [
        "Get the system receiving address for x402 on-chain payments.",
        "",
        "When to use: MUST call this before Mode B Refill to obtain payee_address for payment_requirements.payTo.",
        "Not needed for Mode B card creation — the 402 quote response already includes payee_address.",
        "",
        "Common chain + token combinations: BASE + USDC, ETH + USDC.",
        "If this returns 404: the payee address for this chain/token is not initialized — try a different chain or contact support.",
      ].join("\n"),
      {
        chain_code: z.string().describe("Chain code, e.g. 'ETH', 'BASE'"),
        token_code: z.string().describe("Token code, e.g. 'USDC'"),
      },
      async ({ chain_code, token_code }) => {
        try {
          const result = await client.get<X402PayeeAddress>("/payment/x402/payee-address", {
            chain_code,
            token_code,
          });
          return toolOk(result);
        } catch (err) {
          if (err instanceof ClawallexApiError && err.statusCode === 404) {
            return {
              content: [{ type: "text" as const, text:
                `No payee address found for ${chain_code} + ${token_code}. ` +
                "The payee address for this chain/token combination has not been initialized. " +
                "Common combinations: ETH + USDC. " +
                "Contact support to enable this chain."
              }],
              isError: true as const,
            };
          }
          return toolError(err);
        }
      },
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses error behavior ('If this returns 404... not initialized') and recovery actions ('try a different chain or contact support'). It also notes common valid input combinations. It lacks explicit read-only designation or return format details, but covers the critical failure modes.

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?

Four tightly structured sentences with zero redundancy: purpose statement, mandatory usage condition, exclusion condition, and input/error guidance. Information is front-loaded and every sentence earns its place by providing distinct operational guidance.

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 2-parameter lookup tool without output schema, the description comprehensively covers purpose, workflow integration (Mode B Refill vs creation), valid input patterns, and error handling. It could briefly describe the expected address format return value, but the tool name and context provide sufficient inference for agent usage.

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%, establishing a baseline of 3. The description adds valuable semantic context by listing common valid pairings ('BASE + USDC, ETH + USDC') and embedding the parameters within the workflow context ('obtain payee_address for payment_requirements.payTo'), enhancing understanding beyond raw schema definitions.

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 specific action (Get) and resource (system receiving address for x402 on-chain payments). It distinguishes itself from sibling card/wallet tools by specifying 'x402' and 'payee_address', making its unique purpose immediately identifiable.

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

Usage Guidelines5/5

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

Provides explicit when-to-use ('MUST call this before Mode B Refill') and when-not-to-use ('Not needed for Mode B card creation') guidance. It names the specific alternative workflow (402 quote response) and contextual parameters (payment_requirements.payTo), leaving no ambiguity about tool selection.

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/clawallex/clawallex-mcp'

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