Skip to main content
Glama

insumer_create_merchant

Register a new merchant on the insumer platform. Receive 100 free verification credits upon creation. Each API key can own up to 10 merchants. Requires company name and unique merchant ID.

Instructions

Create a new merchant. Receives 100 free verification credits. The API key that creates the merchant owns it. Max 10 merchants per API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
companyNameYesCompany display name
companyIdYesUnique merchant ID (alphanumeric, dashes, underscores)
locationNoCity or region

Implementation Reference

  • The handler function that executes the tool logic: sends a POST request to /merchants with the provided args (companyName, companyId, location) and returns the formatted result.
    async (args) => {
      const result = await apiCall("POST", "/merchants", args);
      return formatResult(result);
    }
  • The Zod schema defining the input parameters for insumer_create_merchant: companyName (string, max 100), companyId (string, 2-50 chars, alphanumeric/dashes/underscores), location (optional string, max 200).
    {
      companyName: z.string().max(100).describe("Company display name"),
      companyId: z
        .string()
        .min(2)
        .max(50)
        .regex(/^[a-zA-Z0-9_-]+$/)
        .describe("Unique merchant ID (alphanumeric, dashes, underscores)"),
      location: z.string().max(200).optional().describe("City or region"),
    },
  • src/index.ts:506-523 (registration)
    Registration of the tool via server.tool() with the name 'insumer_create_merchant' and a description about creating a merchant with 100 free verification credits.
    server.tool(
      "insumer_create_merchant",
      "Create a new merchant. Receives 100 free verification credits. The API key that creates the merchant owns it. Max 10 merchants per API key.",
      {
        companyName: z.string().max(100).describe("Company display name"),
        companyId: z
          .string()
          .min(2)
          .max(50)
          .regex(/^[a-zA-Z0-9_-]+$/)
          .describe("Unique merchant ID (alphanumeric, dashes, underscores)"),
        location: z.string().max(200).optional().describe("City or region"),
      },
      async (args) => {
        const result = await apiCall("POST", "/merchants", args);
        return formatResult(result);
      }
    );
  • The apiCall helper function used by the handler to make authenticated HTTP requests to the Insumer API with the API key.
    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 function that wraps the API response into the MCP content format, marking errors with isError: true.
    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,
      };
    }
Behavior5/5

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

No annotations were provided, so the description carries full burden. It discloses key behavioral traits: creation grants free credits, ownership by API key, and a limit of 10 merchants. This adds significant transparency beyond the input 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 two short sentences, front-loaded with the core action. Every sentence adds value (create, credits, ownership, limit). No wasted words.

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

Completeness3/5

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

There is no output schema, and the description does not explain the return value of the tool. For a creation action, expected output (e.g., the created merchant object) is missing. However, the description covers creation behavior adequately. Given the lack of output schema, the description is partially 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%, meaning each parameter already has a description in the schema. The tool description does not add additional meaning or constraints for parameters 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 clearly states 'Create a new merchant', which is a specific verb+resource. It distinguishes from sibling tools like insumer_get_merchant or insumer_list_merchants by focusing on creation and adding unique context (free credits, ownership, limit).

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 usage guidance: 'Receives 100 free verification credits', 'The API key that creates the merchant owns it', and 'Max 10 merchants per API key'. This tells the agent when to use (e.g., when creating a new merchant and having capacity) and implies when not to (if already at 10). No explicit alternative is given, but context from siblings is available.

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