Skip to main content
Glama

activate

Register your device to activate a pex.bot simulated trading account and receive 100M KRW for practice trading.

Instructions

Activate your pex.bot account by registering this device. Grants 100M KRW for simulated trading.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the 'activate' tool logic. It collects device fingerprint via getFingerprint(), calls the /auth/activate API endpoint via apiPost(), and returns success message with account balance or error message.
    async () => {
      const fingerprint = getFingerprint();
      try {
        const result = await apiPost<{ activated: boolean; balance: string }>(
          "/auth/activate",
          fingerprint
        );
        return {
          content: [
            {
              type: "text" as const,
              text: `Account activated successfully! Balance: ${Number(result.balance).toLocaleString()} KRW`,
            },
          ],
        };
      } catch (err: any) {
        return {
          content: [{ type: "text" as const, text: `Activation failed: ${err.message}` }],
          isError: true,
        };
      }
    }
  • src/index.ts:224-250 (registration)
    Registration of the 'activate' tool using server.tool(). Defines the tool name, description, empty schema (no input parameters), and the handler function.
    server.tool(
      "activate",
      "Activate your pex.bot account by registering this device. Grants 100M KRW for simulated trading.",
      {},
      async () => {
        const fingerprint = getFingerprint();
        try {
          const result = await apiPost<{ activated: boolean; balance: string }>(
            "/auth/activate",
            fingerprint
          );
          return {
            content: [
              {
                type: "text" as const,
                text: `Account activated successfully! Balance: ${Number(result.balance).toLocaleString()} KRW`,
              },
            ],
          };
        } catch (err: any) {
          return {
            content: [{ type: "text" as const, text: `Activation failed: ${err.message}` }],
            isError: true,
          };
        }
      }
    );
  • Helper function getFingerprint() that collects device information (MAC address, hostname, OS, CPU model) used as the payload for the activate tool.
    function getFingerprint() {
      const interfaces = os.networkInterfaces();
      let macAddress = "00:00:00:00:00:00";
      for (const name of Object.keys(interfaces)) {
        const nets = interfaces[name];
        if (!nets) continue;
        for (const net of nets) {
          if (!net.internal && net.mac && net.mac !== "00:00:00:00:00:00") {
            macAddress = net.mac;
            break;
          }
        }
        if (macAddress !== "00:00:00:00:00:00") break;
      }
    
      const cpus = os.cpus();
      return {
        mac_address: macAddress,
        hostname: os.hostname(),
        os: `${os.type()} ${os.release()}`,
        model_name: cpus.length > 0 ? cpus[0].model : undefined,
        cpu_info: cpus.length > 0 ? `${cpus[0].model} (${cpus.length} cores)` : undefined,
      };
    }
  • Helper function apiPost<T>() that performs authenticated POST requests to the API. Used by the activate handler to call /auth/activate endpoint.
    async function apiPost<T>(path: string, body: unknown): Promise<T> {
      const res = await fetch(`${API_BASE}${path}`, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          ...getAuthHeaders(),
        },
        body: JSON.stringify(body),
      });
      if (!res.ok) {
        const text = await res.text();
        throw new Error(`API POST ${path} failed (${res.status}): ${text}`);
      }
      return res.json() as Promise<T>;
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that activation 'Grants 100M KRW for simulated trading,' which is a useful behavioral trait (resource allocation). However, it lacks details on authentication needs, rate limits, error conditions, or whether this is a one-time or repeatable operation, leaving gaps for a mutation tool.

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 highly concise and front-loaded: two sentences that directly state the action and a key benefit. Every sentence earns its place by providing essential information without redundancy or fluff.

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?

Given the tool's complexity (a mutation with no parameters) and the absence of annotations and output schema, the description is partially complete. It explains the core action and a reward, but lacks details on return values, error handling, or side effects, which are important for an activation tool in a financial simulation context.

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?

The tool has 0 parameters, and schema description coverage is 100%. The description adds no parameter information, which is appropriate since there are no parameters to document. This meets the baseline expectation for a parameterless tool, though it doesn't compensate for any schema gaps (none exist).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Activate your pex.bot account by registering this device.' It specifies the verb ('activate'), resource ('pex.bot account'), and action ('registering this device'). However, it doesn't explicitly differentiate from sibling tools like 'register' or 'join_autonomous', which might have overlapping activation-related functions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: it's for activating an account on a specific device, which suggests it should be used during initial setup or device registration. However, it provides no explicit guidance on when to use this tool versus alternatives like 'register' or 'join_autonomous', nor does it mention prerequisites or exclusions.

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/mikusnuz/pexbot-mcp'

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