Skip to main content
Glama

register_trial

Start a free 30-day trial by providing your email. Receive an API key instantly or access your existing account if already registered.

Instructions

Start a free 30-day trial. Provide your email, get an API key instantly. Calling again with the same email returns your existing account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesYour email address for registration and credential recovery

Implementation Reference

  • src/index.ts:311-367 (registration)
    The 'register_trial' tool is registered using server.tool() with email input validation via Zod. It calls the 'registerTrial' API endpoint and returns API key, invite code, status, trial end date, and next steps.
    // ── Tool: register_trial ─────────────────────────────────────
    
    server.tool(
      "register_trial",
      "Start a free 30-day trial. Provide your email, get an API key instantly. Calling again with the same email returns your existing account.",
      {
        email: z.string().email().describe("Your email address for registration and credential recovery"),
      },
      async ({ email }) => {
        const res = (await callAPI("registerTrial", { email, source: "mcp" })) as {
          code: number;
          message: string;
          data?: {
            apiKey: string;
            inviteCode: string;
            status: string;
            trialEnd: string;
            alreadyRegistered: boolean;
          };
        };
    
        if (res.code !== 0 || !res.data) {
          return {
            content: [
              {
                type: "text" as const,
                text: res.message || "Registration failed. Please try again or contact admin@quanttogo.com.",
              },
            ],
          };
        }
    
        const d = res.data;
        const result = {
          apiKey: d.apiKey,
          inviteCode: d.inviteCode,
          status: d.status,
          trialEnd: d.trialEnd,
          alreadyRegistered: d.alreadyRegistered,
          nextSteps: {
            getSignals: `Call get_signals with apiKey="${d.apiKey}" and a productId from list_strategies`,
            checkStatus: `Call check_subscription with apiKey="${d.apiKey}" to check your trial status`,
            webLogin: `Use invite code ${d.inviteCode} at https://www.quanttogo.com`,
          },
          important: "Save your API key — you'll need it for future sessions.",
        };
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      }
    );
  • The async handler for register_trial: calls registerTrial API with email and source='mcp', processes the response, and returns structured result with apiKey, inviteCode, status, trialEnd, and nextSteps.
      async ({ email }) => {
        const res = (await callAPI("registerTrial", { email, source: "mcp" })) as {
          code: number;
          message: string;
          data?: {
            apiKey: string;
            inviteCode: string;
            status: string;
            trialEnd: string;
            alreadyRegistered: boolean;
          };
        };
    
        if (res.code !== 0 || !res.data) {
          return {
            content: [
              {
                type: "text" as const,
                text: res.message || "Registration failed. Please try again or contact admin@quanttogo.com.",
              },
            ],
          };
        }
    
        const d = res.data;
        const result = {
          apiKey: d.apiKey,
          inviteCode: d.inviteCode,
          status: d.status,
          trialEnd: d.trialEnd,
          alreadyRegistered: d.alreadyRegistered,
          nextSteps: {
            getSignals: `Call get_signals with apiKey="${d.apiKey}" and a productId from list_strategies`,
            checkStatus: `Call check_subscription with apiKey="${d.apiKey}" to check your trial status`,
            webLogin: `Use invite code ${d.inviteCode} at https://www.quanttogo.com`,
          },
          important: "Save your API key — you'll need it for future sessions.",
        };
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      }
    );
  • Zod schema for register_trial input: expects an 'email' field validated as a string email.
    {
      email: z.string().email().describe("Your email address for registration and credential recovery"),
    },
  • The callAPI helper function used by register_trial handler to POST to the quanttogo.com API endpoint.
    async function callAPI(fn: string, body: Record<string, unknown> = {}): Promise<unknown> {
      const resp = await fetch(`${API_BASE}/${fn}`, {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify(body),
      });
      if (!resp.ok) throw new Error(`API ${fn} returned ${resp.status}`);
      return resp.json();
    }
Behavior4/5

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

With no annotations, the description discloses key behaviors: free trial, instant API key, idempotency on same email. It does not mention rate limits or failure modes, but for a simple registration tool, this is adequate.

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 with two sentences: first states the core action, second adds idempotency. No wasted words, appropriate length for a simple tool.

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?

For a tool with one parameter and no output schema, the description covers the main aspects: what it does, what it returns, and key behavior (idempotency). Minor gaps like error handling are acceptable given the low complexity.

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% description coverage on the email parameter, already explaining it's for registration and credential recovery. The tool description adds context (free trial, instant key) but does not significantly enhance parameter semantics beyond the schema.

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: to start a free 30-day trial by providing an email and receiving an API key. It distinguishes itself from siblings like check_subscription and get_subscription_info, which deal with existing subscriptions.

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 implies when to use (to start a trial) but does not explicitly state when not to use or mention alternatives. However, the context is clear for a registration tool, and it notes idempotency on repeat calls.

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/QuantToGo/quanttogo-mcp'

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