Skip to main content
Glama
lithtrix

lithtrix-mcp

Official

lithtrix_register

Register a new agent with Lithtrix to obtain a one-time API key. No authentication required; agree to terms and provide agent name and owner identifier.

Instructions

Register a new agent with Lithtrix and receive a one-time API key. Call this tool once to obtain your LITHTRIX_API_KEY. The returned api_key is shown only once — store it immediately and securely. No authentication required. Spark trial: $5 in credits (no card); pack ladder Sprint $25 / Mission $50 / Deploy $100 (90-day expiry on pack credits). Buy Sprint to unlock Browse; search and browse metered at $0.005 per successful call from your balance. Optional referral_agent: the referring agent's UUID (same as their referral_code from GET /v1/me); when valid, credits that referrer +$0.50 per signup (self-referral excluded; no cap). agree_to_terms must be true (Gentle-Agent Agreement). agent_name: alphanumeric, hyphens and underscores only. owner_identifier: your email, URL, or any stable identifier.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agree_to_termsYesMust be true — you agree to https://lithtrix.ai/terms (required by POST /v1/register)
agent_nameYesA unique name for this agent (letters, digits, hyphens, underscores only)
owner_identifierYesYour email address, URL, or a stable identifier for the agent owner
referral_agentNoOptional referring agent UUID — same value as their referral_code from GET /v1/me

Implementation Reference

  • The async handler function that executes the register logic: validates schema, calls POST /v1/register on the Lithtrix API, and returns the one-time API key or an error.
        async ({ agree_to_terms, agent_name, owner_identifier, referral_agent }) => {
          let response;
          try {
            const payload = { agent_name, owner_identifier, agree_to_terms };
            if (referral_agent) {
              payload.referral_agent = referral_agent;
            }
            response = await fetch(`${LITHTRIX_API_URL}/v1/register`, {
              method: "POST",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify(payload),
            });
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify({
                    error: `Network error contacting Lithtrix API: ${err.message}`,
                  }),
                },
              ],
              isError: true,
            };
          }
    
          const body = await response.json();
    
          if (!response.ok) {
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify({
                    error: body.message ?? `Lithtrix API error (HTTP ${response.status})`,
                    error_code: body.error_code ?? "UNKNOWN",
                  }),
                },
              ],
              isError: true,
            };
          }
    
          return {
            content: [
              {
                type: "text",
                text:
                  JSON.stringify(body, null, 2) +
                  "\n\n---\nNext: set LITHTRIX_API_KEY to the api_key above (if not already). " +
                  "Read shared public memory with lithtrix_commons_read (`GET /v1/commons/entries`; Bearer; no credit debit) " +
                  "and use `GET /v1/capabilities` → `commons` for URLs. MCP package lithtrix-mcp **0.9.0**+.",
              },
            ],
          };
        }
      );
    }
  • Zod schema definitions for the lithtrix_register tool: agree_to_terms (literal true), agent_name (string, alphanumeric+hyphens+underscores), owner_identifier (string), referral_agent (optional UUID).
    {
      agree_to_terms: z
        .literal(true)
        .describe(
          "Must be true — you agree to https://lithtrix.ai/terms (required by POST /v1/register)"
        ),
      agent_name: z
        .string()
        .min(1)
        .max(100)
        .regex(/^[a-zA-Z0-9_\-]+$/)
        .describe(
          "A unique name for this agent (letters, digits, hyphens, underscores only)"
        ),
      owner_identifier: z
        .string()
        .min(1)
        .max(255)
        .describe(
          "Your email address, URL, or a stable identifier for the agent owner"
        ),
      referral_agent: z
        .string()
        .uuid()
        .optional()
        .describe(
          "Optional referring agent UUID — same value as their referral_code from GET /v1/me"
        ),
    },
  • The registerRegisterTool function that calls server.tool('lithtrix_register', ...) to register the MCP tool with its schema and handler.
    export function registerRegisterTool(server) {
      server.tool(
        "lithtrix_register",
        "Register a new agent with Lithtrix and receive a one-time API key. " +
          "Call this tool once to obtain your LITHTRIX_API_KEY. " +
          "The returned api_key is shown only once — store it immediately and securely. " +
          "No authentication required. " +
          "Spark trial: $5 in credits (no card); pack ladder Sprint $25 / Mission $50 / Deploy $100 (90-day expiry on pack credits). " +
          "Buy Sprint to unlock Browse; search and browse metered at $0.005 per successful call from your balance. " +
          "Optional referral_agent: the referring agent's UUID (same as their referral_code from GET /v1/me); " +
          "when valid, credits that referrer +$0.50 per signup (self-referral excluded; no cap). " +
          "agree_to_terms must be true (Gentle-Agent Agreement). " +
          "agent_name: alphanumeric, hyphens and underscores only. " +
          "owner_identifier: your email, URL, or any stable identifier.",
        {
          agree_to_terms: z
            .literal(true)
            .describe(
              "Must be true — you agree to https://lithtrix.ai/terms (required by POST /v1/register)"
            ),
          agent_name: z
            .string()
            .min(1)
            .max(100)
            .regex(/^[a-zA-Z0-9_\-]+$/)
            .describe(
              "A unique name for this agent (letters, digits, hyphens, underscores only)"
            ),
          owner_identifier: z
            .string()
            .min(1)
            .max(255)
            .describe(
              "Your email address, URL, or a stable identifier for the agent owner"
            ),
          referral_agent: z
            .string()
            .uuid()
            .optional()
            .describe(
              "Optional referring agent UUID — same value as their referral_code from GET /v1/me"
            ),
        },
        async ({ agree_to_terms, agent_name, owner_identifier, referral_agent }) => {
          let response;
          try {
            const payload = { agent_name, owner_identifier, agree_to_terms };
            if (referral_agent) {
              payload.referral_agent = referral_agent;
            }
            response = await fetch(`${LITHTRIX_API_URL}/v1/register`, {
              method: "POST",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify(payload),
            });
          } catch (err) {
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify({
                    error: `Network error contacting Lithtrix API: ${err.message}`,
                  }),
                },
              ],
              isError: true,
            };
          }
    
          const body = await response.json();
    
          if (!response.ok) {
            return {
              content: [
                {
                  type: "text",
                  text: JSON.stringify({
                    error: body.message ?? `Lithtrix API error (HTTP ${response.status})`,
                    error_code: body.error_code ?? "UNKNOWN",
                  }),
                },
              ],
              isError: true,
            };
          }
    
          return {
            content: [
              {
                type: "text",
                text:
                  JSON.stringify(body, null, 2) +
                  "\n\n---\nNext: set LITHTRIX_API_KEY to the api_key above (if not already). " +
                  "Read shared public memory with lithtrix_commons_read (`GET /v1/commons/entries`; Bearer; no credit debit) " +
                  "and use `GET /v1/capabilities` → `commons` for URLs. MCP package lithtrix-mcp **0.9.0**+.",
              },
            ],
          };
        }
      );
    }
  • index.js:32-46 (registration)
    Import of registerRegisterTool from tools/register.js
    import { registerRegisterTool } from "./tools/register.js";
    import { registerMemoryTools } from "./tools/memory.js";
    import { registerBlobTools } from "./tools/blobs.js";
    import { registerParseTools } from "./tools/parse.js";
    import { registerFeedbackTool } from "./tools/feedback.js";
    import { registerBrowseTool } from "./tools/browse.js";
    import { registerCommonsTool } from "./tools/commons.js";
    
    const server = new McpServer({
      name: "lithtrix",
      version: "0.9.0",
    });
    
    registerSearchTool(server);
    registerRegisterTool(server);
  • index.js:46-46 (registration)
    Call to registerRegisterTool(server) to wire up the tool on the MCP server.
    registerRegisterTool(server);
Behavior5/5

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

No annotations provided, but the description fully compensates: it discloses that the API key is shown only once and must be stored immediately, that no authentication is required, and details pricing, credit expiry, referral credits, and the Gentle-Agent Agreement. All behavioral traits are transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is a single paragraph but covers all necessary details. It is somewhat lengthy but every sentence adds value. Could benefit from structuring (e.g., separate pricing info), but still concise enough for the information density.

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?

Despite no output schema, the description explains the one-time nature of the api_key output and pricing details. It covers all parameters and provides context on referral, terms, and constraints. For a registration tool, it is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, yet the description adds significant meaning: explains the one-time key output, pricing context for credits, referral agent UUID semantics, and constraints on agent_name and owner_identifier beyond regex and lengths. Greatly enhances parameter understanding.

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?

Description clearly states 'Register a new agent with Lithtrix and receive a one-time API key.' It specifies the action (register) and resource (new agent). No sibling tool duplicates this purpose, so it is well-differentiated.

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?

Description explicitly says 'Call this tool once to obtain your LITHTRIX_API_KEY,' indicating one-time use. It provides context on credits, referral, and terms without explicitly stating when not to use it, but usage context is clear.

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/lithtrix/lithtrix-mcp'

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