Skip to main content
Glama

scroll_to_element

Bring a page element into view by scrolling to it with CSS, XPath, ID, name, tag, class, or link selectors and an optional timeout.

Instructions

Scroll the page to bring an element into view.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "scroll_to_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
byNoStrategycss
timeoutNoSeconds
selectorYesLocator value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.3
    • changedInput schema / properties / by / description
      Previous value: -"Locator strategy"New value: +"Strategy"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector, XPath, or other locator value"New value: +"Locator value"
    • changedInput schema / properties / timeout / description
      Previous value: -"Wait timeout in seconds"New value: +"Seconds"
  2. First observedv0.3.7

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden and discloses almost nothing behavioral: it doesn't say whether it waits for the element to exist, what happens if the selector matches nothing (error vs. silent no-op), or whether the timeout governs the wait or the scroll itself. 'Scroll the page' implies window-level scrolling but leaves element-container scrolling and failure modes unstated.

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?

One front-loaded sentence with zero filler, and the effect is stated before any qualifier. It is efficient, though the brevity shades into under-specification rather than being a model of density.

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?

For a simple three-parameter, single-purpose action with a fully documented schema and no output schema, the description is minimally sufficient. It still omits the failure behavior and session precondition an agent would want before invoking it on a possibly absent element.

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 enum of locator strategies, the timeout default, and the required selector are already documented in the schema. The description adds no syntax examples or clarification beyond that, so baseline 3 applies.

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

Purpose4/5

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

States a specific verb and effect — 'Scroll the page to bring an element into view' — which is unambiguous and matches the tool name. It doesn't reference any sibling, though no sibling duplicates scroll behavior, so an agent can still select it correctly from the list.

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?

There is no guidance on when to use this versus alternatives such as find_element, wait_for_element, or click (which typically auto-scroll). No preconditions are stated, e.g. that a browser session must already be started via start_browser.

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