Skip to main content
Glama
clawallex

Clawallex MCP Server

by clawallex

clawallex_setup

Verify API key authentication and bind agent identity to prepare the Clawallex MCP Server for payment operations and subscription management.

Instructions

Check current Clawallex connection status and ensure agent identity is bound. Calls whoami to verify API Key, then bootstrap to bind client_id if not yet bound. Use this after starting the MCP server to confirm everything is ready for payment operations. Returns: user_id, api_key_id, bound_client_id, client_id_bound status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'clawallex_setup' tool, which performs authentication checks and automatic bootstrapping if necessary.
    async () => {
      try {
        const whoami = await client.getAuth<Record<string, unknown>>("/auth/whoami");
        if (whoami.client_id_bound) {
          return toolOk({
            status: "ready",
            ...whoami,
            _hint: `Connected. API Key bound to client_id '${whoami.bound_client_id}'.`,
          });
        }
        // Not yet bound — auto-bootstrap
        const bootstrap = await client.postAuth<{ client_id: string; created: boolean }>("/auth/bootstrap", {});
        saveClientId(client.baseUrlValue, bootstrap.client_id);
        client.setClientId(bootstrap.client_id);
        return toolOk({
          status: "ready",
          ...whoami,
          bound_client_id: bootstrap.client_id,
          client_id_bound: true,
          _hint: `Connected and bound to client_id '${bootstrap.client_id}'.`,
        });
      } catch (err) {
        return toolError(err);
      }
    },
  • src/tools/auth.ts:8-17 (registration)
    Registration of the 'clawallex_setup' tool within the MCP server.
    server.tool(
      "clawallex_setup",
      [
        "Check current Clawallex connection status and ensure agent identity is bound.",
        "Calls whoami to verify API Key, then bootstrap to bind client_id if not yet bound.",
        "Use this after starting the MCP server to confirm everything is ready for payment operations.",
        "",
        "Returns: user_id, api_key_id, bound_client_id, client_id_bound status.",
      ].join(" "),
      {},
Behavior4/5

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

No annotations provided, so description carries full burden. It discloses the internal two-step process (calls whoami, then conditionally bootstrap), explains the conditional binding logic ('if not yet bound'), and lists return fields (user_id, api_key_id, etc.) despite no output schema existing. Could mention error states or retry behavior.

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 sentences with zero waste: (1) purpose, (2) implementation mechanism, (3) usage timing, (4) return values. Well-structured and front-loaded. No redundant phrases or tautology.

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?

For a zero-parameter setup tool with no annotations, the description is comprehensive. It compensates for the missing output schema by explicitly documenting return values. Covers prerequisites (MCP server started), internal behavior, and success indicators (client_id_bound status).

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?

Tool has zero input parameters. Per evaluation rules, zero parameters establishes a baseline of 4. The description correctly focuses on behavior and return values rather than inventing parameter documentation.

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?

Specific verbs ('Check', 'ensure', 'bind') clearly state the tool verifies connection status and identity binding. It distinguishes itself from siblings by explicitly stating it 'Calls whoami' and 'bootstrap', positioning itself as a composite setup utility rather than requiring manual invocation of those lower-level tools.

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?

Provides explicit temporal guidance: 'Use this after starting the MCP server to confirm everything is ready for payment operations.' Clearly indicates this is an initialization/verification step. Lacks explicit 'when not to use' guidance (e.g., skipping if already verified), though it implies idempotency via 'if not yet bound'.

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