Skip to main content
Glama

insumer_buy_key

Purchase an API key by sending USDC, USDT, or BTC to the provided wallet. No email or authentication needed. Volume discounts reduce cost per call from $0.04 to $0.02.

Instructions

Buy a new API key with USDC, USDT, or BTC (no auth required). Agent-friendly: no email needed. Send USDC/USDT to EVM wallet 0xAd982CB19aCCa2923Df8F687C0614a7700255a23 or Solana wallet 6a1mLjefhvSJX1sEX8PTnionbE9DqoYjU6F6bNkT4Ydr. Send BTC to bc1qg7qnerdhlmdn899zemtez5tcx2a2snc0dt9dt0 (1 confirmation required). USDC/USDT auto-detected from transaction. BTC converted to USD at market rate. One key per wallet — use insumer_buy_credits to top up. Volume discounts: $5–$99 = $0.04/call, $100–$499 = $0.03, $500+ = $0.02. Non-refundable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
txHashYesTransaction hash proving payment
chainIdYesPayment chain: 1, 8453, 137, 42161, 10, 56, 43114, 'solana', or 'bitcoin'. EVM/Solana accept USDC and USDT (auto-detected). Bitcoin accepts BTC (converted to USD at market rate).
amountNoStablecoin amount sent (minimum 5). Not required for BTC — USD value derived from on-chain amount at market rate.
appNameYesName for the API key (e.g. your agent or app name)

Implementation Reference

  • src/index.ts:457-470 (registration)
    Registration of the 'insumer_buy_key' tool on the MCP server. It defines the tool name, description, schema (txHash, chainId, amount, appName), and a handler that makes a public (unauthenticated) POST request to /keys/buy endpoint.
    server.tool(
      "insumer_buy_key",
      "Buy a new API key with USDC, USDT, or BTC (no auth required). Agent-friendly: no email needed. Send USDC/USDT to EVM wallet 0xAd982CB19aCCa2923Df8F687C0614a7700255a23 or Solana wallet 6a1mLjefhvSJX1sEX8PTnionbE9DqoYjU6F6bNkT4Ydr. Send BTC to bc1qg7qnerdhlmdn899zemtez5tcx2a2snc0dt9dt0 (1 confirmation required). USDC/USDT auto-detected from transaction. BTC converted to USD at market rate. One key per wallet — use insumer_buy_credits to top up. Volume discounts: $5–$99 = $0.04/call, $100–$499 = $0.03, $500+ = $0.02. Non-refundable.",
      {
        txHash: z.string().describe("Transaction hash proving payment"),
        chainId: UsdcChainIdWithBitcoin,
        amount: z.number().min(5).optional().describe("Stablecoin amount sent (minimum 5). Not required for BTC — USD value derived from on-chain amount at market rate."),
        appName: z.string().max(100).describe("Name for the API key (e.g. your agent or app name)"),
      },
      async (args) => {
        const result = await publicApiCall("POST", "/keys/buy", args);
        return formatResult(result);
      }
    );
  • Handler function for insumer_buy_key: calls publicApiCall to POST /keys/buy with the input args (txHash, chainId, amount, appName), then formats the result.
    async (args) => {
      const result = await publicApiCall("POST", "/keys/buy", args);
      return formatResult(result);
    }
  • Input schema for insumer_buy_key using Zod validation: txHash (string), chainId (UsdcChainIdWithBitcoin union type), amount (optional number, min 5), appName (string max 100 chars).
    {
      txHash: z.string().describe("Transaction hash proving payment"),
      chainId: UsdcChainIdWithBitcoin,
      amount: z.number().min(5).optional().describe("Stablecoin amount sent (minimum 5). Not required for BTC — USD value derived from on-chain amount at market rate."),
      appName: z.string().max(100).describe("Name for the API key (e.g. your agent or app name)"),
  • Zod schema UsdcChainIdWithBitcoin used in the chainId parameter of insumer_buy_key. Supports EVM chain IDs (1, 8453, 137, 42161, 10, 56, 43114), 'solana', or 'bitcoin'.
    const UsdcChainIdWithBitcoin = z
      .union([
        z.enum(["1", "8453", "137", "42161", "10", "56", "43114"]).transform(Number),
        z.number().int().refine(
          (n) => [1, 8453, 137, 42161, 10, 56, 43114].includes(n),
          "Must be a supported payment chain"
        ),
        z.literal("solana"),
        z.literal("bitcoin"),
      ])
      .describe("Payment chain: 1, 8453, 137, 42161, 10, 56, 43114, 'solana', or 'bitcoin'. EVM/Solana accept USDC and USDT (auto-detected). Bitcoin accepts BTC (converted to USD at market rate).");
  • The publicApiCall helper function used by insumer_buy_key's handler. Unlike apiCall, it does NOT include an X-API-Key header, making the call unauthenticated (since buying a key doesn't require an existing API key).
    async function publicApiCall(
      method: string,
      path: string,
      body?: Record<string, unknown>
    ): Promise<{ ok: boolean; data?: unknown; error?: unknown; meta?: unknown }> {
      const url = `${API_BASE}${path}`;
      const res = await fetch(url, {
        method,
        headers: { "Content-Type": "application/json" },
        body: body ? JSON.stringify(body) : undefined,
      });
      return res.json() as Promise<{
        ok: boolean;
        data?: unknown;
        error?: unknown;
        meta?: unknown;
      }>;
    }
Behavior5/5

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

No annotations, but description covers all behavioral traits: payment methods, wallet addresses, auto-detection, BTC conversion, one key per wallet, volume discounts, and non-refundable nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Compact paragraph with all essential info, though slightly dense. No redundancy, but could be broken into bullets for clarity.

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?

Comprehensive coverage of payment methods, wallets, discounts, and exceptions (non-refundable, one key per wallet). Sufficient for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, and description adds context: txHash as proof, chainId details, amount minimum and BTC exception, appName as key name.

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 verb 'Buy' and resource 'new API key' with specific payment methods, and distinguishes from sibling 'insumer_buy_credits' for topping up.

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?

Explicitly states no auth required and 'Agent-friendly: no email needed.' Also provides alternative: 'One key per wallet — use insumer_buy_credits to top up.'

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/douglasborthwick-crypto/mcp-server-insumer'

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