Skip to main content
Glama
andresolbach

nodriver-mcp-server

Scroll to element

scroll_to_selector

Scrolls the first element matching a CSS selector into the center of the viewport, preparing it for interaction. Reports whether a match was found.

Instructions

Scroll the first element matching a CSS selector into view, centered.

More precise than scroll_page when you already know what you are looking for, and the usual preparation for click_at, which needs its target inside the viewport.

click scrolls to its own target, so this is unnecessary before it. Reports whether anything matched instead of failing silently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
browserNoWhich browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.default
selectorYesCSS selector of the element to scroll to; the first match wins.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / browser
      Added value: +{
      +  "default": "default",
      +  "description": "Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.",
      +  "type": "string"
      +}
  2. First observedv1.7.2

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the sparse annotations (readOnlyHint=false, destructiveHint=false), the description discloses error-handling behavior: 'Reports whether anything matched instead of failing silently.' It also specifies that the first matching element wins and that the element is centered. This adds genuinely useful behavioral context the annotations do not cover.

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?

Four short sentences, each earning its place: the core action, the scroll_page comparison, the click_at preparation note, and the click exclusion plus behavior note. The most important information is front-loaded in sentence one. There is zero waste.

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?

For a simple two-parameter tool with an output schema, the description covers everything an agent needs: what it does, how it differs from scroll_page, when it is a prerequisite (click_at), when it is unnecessary (before click), and what happens when nothing matches. The output schema covers return values, so their absence from the description is not a gap.

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 description coverage is 100%, so the baseline is 3. The description adds nothing about the browser parameter that the schema doesn't already state, and the 'first match wins' detail is already present in the schema's selector description. It neither harms nor materially improves parameter understanding.

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 opens with a specific verb and resource: 'Scroll the first element matching a CSS selector into view, centered.' It adds the 'first match wins' scoping and the centered positioning detail, and the subsequent sentence explicitly distinguishes it from scroll_page. An agent can tell exactly what this tool does.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: it is 'more precise than scroll_page when you already know what you are looking for' and is 'the usual preparation for click_at.' It also names an exclusion condition: 'click scrolls to its own target, so this is unnecessary before it.' No inference is required.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.