Skip to main content
Glama
AdsPower

AdsPower LocalAPI MCP Server

Official

scroll-element

Scroll to specific elements on web pages using CSS selectors. This tool helps automate browser interactions by navigating to elements that require scrolling to access.

Instructions

Scroll the element

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesThe selector of the element to scroll, find from the page source code, Simulates a user navigating page by scrolling, usually finding element in the bottom of the page

Implementation Reference

  • The main handler function for the 'scroll-element' tool. It waits for the selector, then uses page.evaluate to scroll the element into view smoothly.
    async scrollElement({ selector }: ScrollElementParams) {
        browser.checkConnected();
        await browser.pageInstance!.waitForSelector(selector);
        await browser.pageInstance!.evaluate((selector) => {
            const element = document.querySelector(selector);
            if (element) {
                element.scrollIntoView({ behavior: 'smooth' });
            }
        }, selector);
        return `Scrolled element with selector: ${selector} successfully`;
    },
  • Zod schema defining the input parameters for the scroll-element tool: requires a 'selector' string.
    scrollElementSchema: z.object({
        selector: z.string().describe('The selector of the element to scroll, find from the page source code, Simulates a user navigating page by scrolling, usually finding element in the bottom of the page')
    }).strict(),
  • Registers the 'scroll-element' tool on the MCP server, providing name, description, input schema, and wrapped handler.
    server.tool('scroll-element', 'Scroll the element', schemas.scrollElementSchema.shape,
        wrapHandler(automationHandlers.scrollElement));
Behavior1/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. 'Scroll the element' fails to disclose critical traits: it doesn't specify if this simulates user scrolling (implied by the schema but not stated), what happens if the element isn't scrollable, whether it requires a browser session, or any side effects like page reloads. The description is minimal and lacks behavioral context, making it inadequate for a tool with potential interaction effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, which is front-loaded and wastes no space. However, this conciseness comes at the cost of under-specification—it's too brief to be helpful. While efficient, it lacks necessary detail, but since every sentence (in this case, the phrase) technically 'earns its place' by stating the action, it avoids redundancy and is structurally sound.

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 complexity of a browser interaction tool with no annotations and no output schema, the description is incomplete. It doesn't explain what scrolling entails (e.g., smooth vs. instant, direction), expected outcomes, error conditions, or how it integrates with sibling tools like 'get-page-html'. For a tool that likely involves user simulation and page manipulation, more context is needed to guide effective use.

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% description coverage, with the 'selector' parameter well-documented in the schema itself. The description adds no additional meaning beyond what the schema provides (e.g., it doesn't clarify selector syntax, scrolling behavior, or examples). According to the rules, with high schema coverage (>80%), the baseline score is 3, as the description doesn't need to compensate but also doesn't enhance parameter understanding.

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

Purpose2/5

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

The description 'Scroll the element' is a tautology that essentially restates the tool name without adding meaningful specificity. While it indicates the action (scroll) and target (element), it doesn't distinguish this tool from sibling tools like 'hover-element' or 'drag-element' in terms of what scrolling accomplishes (e.g., bringing content into view, simulating user interaction). The purpose is vague and lacks differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention context such as scrolling to view hidden content, interacting with dynamic pages, or prerequisites like needing an element selector. With sibling tools like 'navigate' or 'hover-element', there's no explicit or implied distinction for usage scenarios, leaving the agent without clear direction.

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/AdsPower/local-api-mcp-typescript'

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