Skip to main content
Glama

scroll

Scroll web pages up or down to navigate content within the atlas-browser-mcp server's visual browsing interface.

Instructions

Scroll the page up or down

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionNoScroll direction (default: down)down

Implementation Reference

  • Main scroll handler that validates input, determines scroll amount, calls humanized scroll, and returns page observation
    def _scroll(self, direction: str = "down", **_) -> BrowserResult:
        """Scroll the page"""
        if self._page is None:
            return BrowserResult(success=False, error="No page open")
        
        if direction not in ["up", "down"]:
            return BrowserResult(success=False, error="direction must be 'up' or 'down'")
        
        try:
            amount = random.randint(250, 400) if self._humanize else 300
            self._human_scroll(direction, amount)
            return self._observe()
            
        except Exception as e:
            return BrowserResult(
                success=False,
                error=f"Scroll failed: {str(e)}"
            )
  • Humanized scroll helper that simulates natural scrolling with inertia using segmented wheel movements and occasional corrections
    def _human_scroll(self, direction: str, amount: int = 300):
        """Humanized scrolling with inertia"""
        delta = amount if direction == "down" else -amount
        
        if not self._humanize:
            self._page.mouse.wheel(0, delta)
            return
        
        segments = random.randint(5, 10)
        total_scrolled = 0
        
        for i in range(segments):
            progress = i / segments
            if progress < 0.2 or progress > 0.8:
                segment_ratio = 0.05
            else:
                segment_ratio = 0.15
            
            segment_delta = int(delta * segment_ratio)
            self._page.mouse.wheel(0, segment_delta)
            total_scrolled += segment_delta
            time.sleep(random.uniform(0.02, 0.05))
        
        remaining = delta - total_scrolled
        if abs(remaining) > 10:
            self._page.mouse.wheel(0, remaining)
        
        if random.random() < 0.15:
            time.sleep(random.uniform(0.1, 0.3))
            correction = int(delta * random.uniform(-0.1, -0.05))
            self._page.mouse.wheel(0, correction)
        
        if self._humanize:
            time.sleep(random.uniform(0.3, 0.8))
  • Tool schema registration defining the scroll tool with name, description, and inputSchema (direction parameter with enum values)
    Tool(
        name="scroll",
        description="Scroll the page up or down",
        inputSchema={
            "type": "object",
            "properties": {
                "direction": {
                    "type": "string",
                    "enum": ["up", "down"],
                    "description": "Scroll direction (default: down)",
                    "default": "down"
                }
            }
        }
    )
  • Tool call handler that routes 'scroll' tool invocations to browser.execute with action='scroll' and direction parameter
    elif name == "scroll":
        result = await asyncio.to_thread(
            browser.execute,
            action="scroll",
            direction=arguments.get("direction", "down")
        )
  • Action mapping that connects the 'scroll' action string to the _scroll method handler in the execute dispatcher
    actions = {
        "navigate": self._navigate,
        "observe": self._observe,
        "click": self._click,
        "multi_click": self._multi_click,
        "type": self._type,
        "scroll": self._scroll,
        "close": self._close
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions scrolling 'up or down' but doesn't describe how much scrolling occurs (e.g., by pixels, viewport height), whether it's smooth or instant, or any side effects (e.g., page reloads, element visibility changes). For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence with zero waste. It is appropriately sized for a simple tool and front-loaded with the core action. Every word earns its place, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, no output schema, no annotations), the description is incomplete. It lacks details on scrolling behavior (e.g., amount, smoothness), usage context, and how it integrates with sibling tools like 'navigate'. Without annotations or output schema, the description should provide more context to compensate, but it does not.

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% coverage with a clear description and enum for the 'direction' parameter. The description adds no additional meaning beyond what the schema provides, as it only restates 'up or down' without explaining parameter implications (e.g., default behavior, effect on page position). With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('scroll') and target ('the page') but is vague about scope and mechanism. It doesn't specify whether this scrolls by a fixed amount, to a specific position, or continuously, nor does it distinguish from potential sibling actions like navigating to different pages. The purpose is understandable but lacks specificity.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'navigate' or 'click'. The description implies usage for scrolling but doesn't specify contexts (e.g., after loading a page, to view content) or exclusions (e.g., not for horizontal scrolling). Without such details, the agent must infer usage from the tool name alone.

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/LingTravel/Atlas-Browser'

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