Skip to main content
Glama

browser_scroll

Scroll a webpage to a specific element or by pixel coordinates, supporting auto or smooth behavior to trigger lazy-loaded content or bring elements into view for testing.

Instructions

Scroll the page or to a specific element. Supports scrollIntoView for targeting an element and pixel-based x/y scrolling with auto/smooth behavior.

中文详情:

  • 用途:滚动页面到指定位置,支持滚动到指定元素(scrollIntoView)或按像素值(x/y)滚动

  • 何时使用:需要触发懒加载内容时;将目标元素滚动到可视区域时;测试无限滚动分页时;截图前确保元素可见时

  • 输出:{ ok: boolean, scrollX: number, scrollY: number, scrolledTo: string, timestamp: string }

  • 参数:

    • selector (string, 可选):要滚动到的目标元素选择器,与 scrollIntoView 配合使用

    • scrollIntoView (boolean, 可选):是否滚动到 selector 指定的元素,默认 true(指定 selector 时)

    • x (number, 可选):横向滚动像素值(不指定 selector 时使用)

    • y (number, 可选):纵向滚动像素值(不指定 selector 时使用)

    • behavior (string, 可选):滚动行为,可选 auto/smooth,默认 auto

  • 错误:selector 无匹配抛出 'element not found';selector 与 x/y 同时提供时以 selector 为优先

  • 示例:{"selector":"#footer","behavior":"smooth"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNo横向滚动像素值(不指定 selector 时使用)
yNo纵向滚动像素值(不指定 selector 时使用)
behaviorNo滚动行为,默认 auto
selectorNo要滚动到的目标元素选择器,与 scrollIntoView 配合使用
scrollIntoViewNo是否滚动到 selector 指定的元素,默认 true(指定 selector 时)
Behavior4/5

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

No annotations provided, but the description discloses error handling ('element not found'), priority rules (selector over x/y), and output format with fields like ok, scrollX, scrollY, scrolledTo, timestamp. This adds significant behavioral context beyond basic purpose.

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 well-structured with an English summary followed by a detailed Chinese section using clear headers (用途, 何时使用, 输出, 参数, 错误, 示例). It is front-loaded and every section adds value without redundancy.

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?

Given the tool has 5 optional parameters, no output schema, and complex scrolling behavior, the description covers output format, error conditions, parameter interactions, and usage examples, making it fully complete for an AI agent to correctly invoke the tool.

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?

Schema description coverage is 100%, baseline 3. The description adds value by explaining defaults (scrollIntoView default true when selector given), behavior options, and provides an example. This helps an agent understand parameter interactions.

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 scrolls the page or to a specific element, supporting both scrollIntoView and pixel-based scrolling. This distinguishes it from sibling tools, as no other tool in the list has scrolling as primary function.

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 provides explicit use cases: triggering lazy content, scrolling elements into view, testing infinite scroll, ensuring visibility before screenshots. It does not mention when not to use or alternatives, but the 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/validpilot/ai-verify-mcp'

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