Skip to main content
Glama

insumer_request_domain_verification

Request a domain verification token for a merchant. Returns token and three methods: DNS TXT, HTML meta tag, or file upload. After placing token, call verify to complete and earn a trust badge.

Instructions

Request a domain verification token for a merchant. Returns the token and three verification methods: DNS TXT record, HTML meta tag, or file upload. After placing the token, call insumer_verify_domain to complete verification. Verified merchants get a trust badge in the public directory. Owner only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMerchant ID
domainYesDomain to verify (e.g. 'example.com')

Implementation Reference

  • The async handler function that executes the domain verification request. It sends a POST request to /merchants/{id}/domain-verification with the merchant ID and domain, then returns the formatted result containing the verification token and methods (DNS TXT record, HTML meta tag, or file upload).
      async (args) => {
        const { id, ...body } = args;
        const result = await apiCall(
          "POST",
          `/merchants/${encodeURIComponent(id)}/domain-verification`,
          body
        );
        return formatResult(result);
      }
    );
  • Input schema for the tool using Zod validation. Requires an 'id' (Merchant ID string) and 'domain' (domain to verify, e.g. 'example.com').
    {
      id: z.string().describe("Merchant ID"),
      domain: z.string().describe("Domain to verify (e.g. 'example.com')"),
    },
  • src/index.ts:665-681 (registration)
    Registration of the tool on the MCP server using server.tool() with the name 'insumer_request_domain_verification', a description explaining the purpose and verification methods, the schema, and the handler.
    server.tool(
      "insumer_request_domain_verification",
      "Request a domain verification token for a merchant. Returns the token and three verification methods: DNS TXT record, HTML meta tag, or file upload. After placing the token, call insumer_verify_domain to complete verification. Verified merchants get a trust badge in the public directory. Owner only.",
      {
        id: z.string().describe("Merchant ID"),
        domain: z.string().describe("Domain to verify (e.g. 'example.com')"),
      },
      async (args) => {
        const { id, ...body } = args;
        const result = await apiCall(
          "POST",
          `/merchants/${encodeURIComponent(id)}/domain-verification`,
          body
        );
        return formatResult(result);
      }
    );
  • The apiCall helper function used by the handler. It constructs the URL using API_BASE, sends a fetch request with the API key header and JSON body, and parses the JSON response.
    async function apiCall(
      method: string,
      path: string,
      body?: Record<string, unknown>
    ): Promise<{ ok: boolean; data?: unknown; error?: unknown; meta?: unknown }> {
      if (!apiKey) {
        return { ok: false, error: "INSUMER_API_KEY is not set. Call the insumer_setup tool to generate a free API key instantly, then add it to your MCP config as INSUMER_API_KEY and restart." };
      }
      const url = `${API_BASE}${path}`;
      const res = await fetch(url, {
        method,
        headers: {
          "Content-Type": "application/json",
          "X-API-Key": apiKey,
        },
        body: body ? JSON.stringify(body) : undefined,
      });
      return res.json() as Promise<{
        ok: boolean;
        data?: unknown;
        error?: unknown;
        meta?: unknown;
      }>;
    }
  • The formatResult helper used by the handler to format API responses into MCP content. Returns a success content block on ok, or an error content block with isError: true on failure.
    function formatResult(result: {
      ok: boolean;
      data?: unknown;
      error?: unknown;
      meta?: unknown;
    }) {
      if (result.ok) {
        return {
          content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
        };
      }
      return {
        content: [{ type: "text" as const, text: JSON.stringify(result, null, 2) }],
        isError: true,
      };
    }
Behavior4/5

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

No annotations are provided, so the description carries the burden. It reveals that the tool returns 'the token and three verification methods,' and that 'Verified merchants get a trust badge.' It also notes the permission requirement ('Owner only'). These add behavioral context beyond the schema.

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 concise at 4 sentences, each adding value: purpose, return details, next step, benefit, and permission. No wasted words, well structured.

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?

The description covers return values, next steps, and usage context. Even without an output schema, it provides enough information for an agent to understand and use the tool correctly. It also mentions the benefit (trust badge) and permission, making it contextually complete.

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 description coverage is 100%, so baseline is 3. The description does not add additional meaning to parameters beyond the schema. It mentions 'domain' and 'merchant' implicitly but no extra details.

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 tool's purpose: 'Request a domain verification token for a merchant.' It specifies the resource (domain verification token) and action (request). It also distinguishes from the sibling tool 'insumer_verify_domain' by explaining this is the first step before verification.

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 explicit guidance: 'After placing the token, call insumer_verify_domain to complete verification.' This tells the agent when to use the sibling tool. It also mentions 'Owner only,' indicating who can use it. However, it lacks explicit when-not-to-use or alternative scenarios.

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