Skip to main content
Glama

humanizer_scroll

Scroll a webpage by dispatching a single wheel event with specified vertical and horizontal pixel deltas.

Instructions

Dispatch a wheel event. Raw page.mouse.wheel — single event, not multi-step.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_idYesTarget ID from interceptor_browser_launch or interceptor_camoufox_launch
delta_yYesVertical scroll delta in pixels (positive = scroll down)
delta_xNoHorizontal scroll delta in pixels (default: 0)

Implementation Reference

  • Tool 'humanizer_scroll' registered via server.tool() with Zod schema for target_id, delta_y, delta_x and async handler that delegates to humanizerEngine.scroll.
    // ── humanizer_scroll ───────────────────────────────────────────
    
    server.tool(
      "humanizer_scroll",
      "Dispatch a wheel event. Raw page.mouse.wheel — single event, not multi-step.",
      {
        target_id: z.string().describe("Target ID from interceptor_browser_launch or interceptor_camoufox_launch"),
        delta_y: z.number().describe("Vertical scroll delta in pixels (positive = scroll down)"),
        delta_x: z.number().optional().default(0)
          .describe("Horizontal scroll delta in pixels (default: 0)"),
      },
      async ({ target_id, delta_y, delta_x }) => {
        try {
          const result = await humanizerEngine.scroll(target_id, delta_y, delta_x);
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                status: "success",
                target_id,
                action: "scroll",
                delta: { x: delta_x, y: delta_y },
                stats: { total_ms: result.totalMs, events_dispatched: result.eventsDispatched },
              }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", target_id, action: "scroll", error: errorToString(e) }) }] };
        }
      },
    );
  • Async handler function that extracts target_id, delta_y, delta_x, calls humanizerEngine.scroll(), and returns a JSON response with status, target_id, action, delta, and stats.
    server.tool(
      "humanizer_scroll",
      "Dispatch a wheel event. Raw page.mouse.wheel — single event, not multi-step.",
      {
        target_id: z.string().describe("Target ID from interceptor_browser_launch or interceptor_camoufox_launch"),
        delta_y: z.number().describe("Vertical scroll delta in pixels (positive = scroll down)"),
        delta_x: z.number().optional().default(0)
          .describe("Horizontal scroll delta in pixels (default: 0)"),
      },
      async ({ target_id, delta_y, delta_x }) => {
        try {
          const result = await humanizerEngine.scroll(target_id, delta_y, delta_x);
          return {
            content: [{
              type: "text",
  • Zod schema for humanizer_scroll: target_id (string), delta_y (number), delta_x (optional number, default 0).
    },
    async ({ target_id, delta_y, delta_x }) => {
  • Core scroll implementation: gets the Playwright page for the target, calls page.mouse.wheel(deltaX, deltaY), and returns totalMs and eventsDispatched.
    async scroll(
      targetId: string,
      deltaY: number,
      deltaX?: number,
    ): Promise<{ totalMs: number; eventsDispatched: number }> {
      const page = await getPageForTarget(targetId);
      const start = Date.now();
      await page.mouse.wheel(deltaX ?? 0, deltaY);
      return { totalMs: Date.now() - start, eventsDispatched: 1 };
    }
Behavior3/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 tool dispatches a single raw wheel event, which is a basic behavioral trait. However, it lacks details on side effects, safety, or permissions beyond the event itself.

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 short, focused sentences. The first states the purpose, the second adds precision with technical detail. No redundant or extraneous information.

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?

The tool is simple and the schema is complete, but the description does not differentiate it from sibling humanizer tools beyond stating it's a wheel event. It lacks context about when to use this tool over others like humanizer_click or humanizer_move.

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%, and the description adds no extra meaning to the parameters (target_id, delta_y, delta_x) beyond what the schema already provides. 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 it dispatches a wheel event, specifying it is a single event using raw page.mouse.wheel. This distinguishes it from potential multi-step scrolling tools among siblings.

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 notes 'single event, not multi-step,' which implies when to use this tool (single scroll) and hints at when not to (multi-step scenarios). However, it does not explicitly mention alternative tools or conditions for avoiding this tool.

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