Skip to main content
Glama

create_wallet

Create a new CardZero wallet to receive a wallet address and one-time claim key for the human owner. No authentication required.

Instructions

Create a new CardZero wallet. Returns a wallet address and one-time claim key for the human owner. No authentication required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoOptional display name for the wallet

Implementation Reference

  • The handler function for the create_wallet tool. It accepts an optional 'name' parameter, calls POST /wallets (without auth), and returns the wallet info (address + claim key).
      async ({ name }) => {
        try {
          const body: Record<string, unknown> = {};
          if (name) body.name = name;
          const res = await callApi("POST", "/wallets", body, false);
          if (!res.ok) return errorResponse("Create wallet failed", res);
          return successResponse(res.json);
        } catch (e) {
          return { content: [{ type: "text" as const, text: `Create wallet error: ${e}` }], isError: true };
        }
      },
    );
  • Zod schema for the create_wallet tool input: an optional 'name' string describing the display name for the wallet.
    { name: z.string().optional().describe("Optional display name for the wallet") },
  • src/index.ts:99-114 (registration)
    Registration of the 'create_wallet' tool on the McpServer via server.tool(), with a description and the handler.
    server.tool(
      "create_wallet",
      "Create a new CardZero wallet. Returns a wallet address and one-time claim key for the human owner. No authentication required.",
      { name: z.string().optional().describe("Optional display name for the wallet") },
      async ({ name }) => {
        try {
          const body: Record<string, unknown> = {};
          if (name) body.name = name;
          const res = await callApi("POST", "/wallets", body, false);
          if (!res.ok) return errorResponse("Create wallet failed", res);
          return successResponse(res.json);
        } catch (e) {
          return { content: [{ type: "text" as const, text: `Create wallet error: ${e}` }], isError: true };
        }
      },
    );
  • The callApi helper used by the handler to make HTTP POST /wallets requests. The 'auth=false' parameter skips the API key header, allowing unauthenticated wallet creation.
    async function callApi(
      method: "GET" | "POST",
      path: string,
      body?: Record<string, unknown>,
      auth = true,
    ): Promise<ApiResult> {
      if (auth && !API_KEY) {
        return {
          ok: false,
          status: 401,
          json: {
            error: "config_missing",
            message: "CARDZERO_API_KEY is not set. Get one at https://cardzero.ai",
          },
        };
      }
    
      const headers: Record<string, string> = {};
      if (auth) headers["Authorization"] = `Bearer ${API_KEY}`;
      if (body) headers["Content-Type"] = "application/json";
    
      const res = await fetch(`${API_URL}${path}`, {
        method,
        headers,
        body: body ? JSON.stringify(body) : undefined,
      });
    
      const json = await res.json() as Record<string, unknown>;
      return { ok: res.ok, status: res.status, json };
    }
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that no authentication is needed and that it returns a wallet address and claim key, which is helpful. However, it does not mention potential side effects or idempotency, so it's adequate but not exceptional.

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?

Two concise sentences that cover purpose and key behavioral info without any fluff. Every word earns its place.

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?

The description is complete for a simple creation tool with one optional parameter. It specifies the return values despite no output schema, and the lack of annotations is partially compensated by clear behavioral statements. Minor gap: it doesn't mention if wallet creation is idempotent.

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?

The input schema has 100% coverage with a single optional parameter ('name') that already includes a description. The tool description adds no additional meaning to this parameter, which is acceptable given the schema's completeness.

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 action ('Create a new CardZero wallet') and specifies the outputs ('Returns a wallet address and one-time claim key for the human owner'). It distinguishes itself from sibling tools like create_job or fund_job by focusing solely on wallet creation.

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 explicitly states 'No authentication required,' providing a key usage condition. While it doesn't mention alternatives or exclusion scenarios, this is reasonable for a creation tool and leaves little ambiguity.

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/mrocker/cardzero-mcp'

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