Skip to main content
Glama

humanizer_idle

Simulate human-like idle behavior using mouse micro-jitter and occasional micro-scrolls to evade bot-detection scripts that monitor activity.

Instructions

Simulate idle behavior with mouse micro-jitter and occasional micro-scrolls. Keeps the page 'alive' to avoid idle detection by bot-detection scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_idYesTarget ID from interceptor_browser_launch or interceptor_camoufox_launch
duration_msYesHow long to simulate idle behavior in ms
intensityNoIdle intensity: 'subtle' (±3px jitter) or 'normal' (±8px jitter, more scrolls)subtle

Implementation Reference

  • The idle() method on HumanizerEngine that executes the core logic: mouse micro-jitter and micro-scrolls to simulate human idle behavior.
    async idle(
      targetId: string,
      durationMs: number,
      intensity: "subtle" | "normal" = "subtle",
    ): Promise<{ totalMs: number; eventsDispatched: number }> {
      const page = await getPageForTarget(targetId);
      const state = getMouseState(targetId);
      const start = Date.now();
      let eventsDispatched = 0;
    
      const jitterRadius = intensity === "subtle" ? 3 : 8;
      const scrollChance = intensity === "subtle" ? 0.05 : 0.15;
      const actionInterval = intensity === "subtle" ? rand(400, 1200) : rand(200, 600);
    
      while (Date.now() - start < durationMs) {
        const waitMs = Math.min(
          Math.round(rand(actionInterval * 0.7, actionInterval * 1.3)),
          durationMs - (Date.now() - start),
        );
        if (waitMs > 0) await sleep(waitMs);
        if (Date.now() - start >= durationMs) break;
    
        if (Math.random() < scrollChance) {
          const microDelta = Math.round(rand(-20, 20));
          if (microDelta !== 0) {
            await page.mouse.wheel(0, microDelta);
            eventsDispatched++;
          }
        } else {
          const jx = Math.round(state.x + rand(-jitterRadius, jitterRadius));
          const jy = Math.round(state.y + rand(-jitterRadius, jitterRadius));
          await page.mouse.move(jx, jy);
          state.x = jx;
          state.y = jy;
          eventsDispatched++;
        }
      }
    
      return { totalMs: Date.now() - start, eventsDispatched };
  • The MCP tool handler for 'humanizer_idle' that calls humanizerEngine.idle() and formats the response.
    server.tool(
      "humanizer_idle",
      "Simulate idle behavior with mouse micro-jitter and occasional micro-scrolls. " +
      "Keeps the page 'alive' to avoid idle detection by bot-detection scripts.",
      {
        target_id: z.string().describe("Target ID from interceptor_browser_launch or interceptor_camoufox_launch"),
        duration_ms: z.number().describe("How long to simulate idle behavior in ms"),
        intensity: z.enum(["subtle", "normal"]).optional().default("subtle")
          .describe("Idle intensity: 'subtle' (±3px jitter) or 'normal' (±8px jitter, more scrolls)"),
      },
      async ({ target_id, duration_ms, intensity }) => {
        try {
          const result = await humanizerEngine.idle(target_id, duration_ms, intensity);
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                status: "success",
                target_id,
                action: "idle",
                requested_ms: duration_ms,
                intensity,
                stats: { total_ms: result.totalMs, events_dispatched: result.eventsDispatched },
              }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", target_id, action: "idle", error: errorToString(e) }) }] };
        }
      },
    );
  • Schema/input validation for humanizer_idle tool: target_id, duration_ms, and optional intensity ('subtle' or 'normal').
    {
      target_id: z.string().describe("Target ID from interceptor_browser_launch or interceptor_camoufox_launch"),
      duration_ms: z.number().describe("How long to simulate idle behavior in ms"),
      intensity: z.enum(["subtle", "normal"]).optional().default("subtle")
        .describe("Idle intensity: 'subtle' (±3px jitter) or 'normal' (±8px jitter, more scrolls)"),
    },
  • src/index.ts:71-71 (registration)
    Registration of all humanizer tools (including humanizer_idle) in the MCP server via registerHumanizerTools().
    registerHumanizerTools(server);
  • The registerHumanizerTools function exported from humanizer.ts that registers all humanizer tools on the MCP server.
    export function registerHumanizerTools(server: McpServer): void {
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses the simulated idle behavior and its purpose (avoiding bot detection), but lacks details on any side effects or required permissions. Overall adequate for a non-destructive 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?

Two sentences, efficiently conveying purpose and effect with no wasted words. Front-loaded with the main action.

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 simple tool with 3 parameters and no output schema, the description covers the core functionality and context (avoiding bot detection). It could be slightly more complete by clarifying edge cases or when not to use it, but it is sufficient for an agent to understand its role among sibling tools.

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?

Schema coverage is 100%, so the description does not need to add much. The description itself does not elaborate on parameters, but the schema already provides clear descriptions for target_id, duration_ms, and intensity. Baseline score of 3 is appropriate.

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 simulates idle behavior with mouse micro-jitter and micro-scrolls, which is a specific verb-resource pair and distinguishes it from active humanizer tools like click, move, etc.

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 for avoiding idle detection but does not provide explicit when-to-use or when-not-to-use guidance, nor does it mention alternatives.

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/yfe404/proxy-mcp'

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