Summary
Add a browser_scroll tool to the MCP server. Content below the fold or behind lazy-loading is currently hard to reach: an agent can only act on what a snapshot already exposes.
Scope
- Add
browser_scroll in mcp/rustwright_mcp/server.py supporting: scroll to a snapshot ref (element.scroll_into_view_if_needed()), and scroll the viewport by a direction/amount (page.mouse.wheel or window.scrollBy).
- Return a fresh snapshot after scrolling.
- Reuse the existing ref-or-selector resolver so
target accepts a ref (e12) or CSS selector, consistent with browser_click.
Acceptance criteria
- Scrolling to a ref that starts off-screen brings it into view (verify via bounding box in a fixture page).
- Viewport scroll changes
window.scrollY.
- A test against a tall local fixture.
Pointers
- Resolver + snapshot helpers in
mcp/rustwright_mcp/server.py.
- Fixture pattern:
mcp/tests/fixtures/.
Proposed as a good first issue; a maintainer will apply the label.
Summary
Add a
browser_scrolltool to the MCP server. Content below the fold or behind lazy-loading is currently hard to reach: an agent can only act on what a snapshot already exposes.Scope
browser_scrollinmcp/rustwright_mcp/server.pysupporting: scroll to a snapshot ref (element.scroll_into_view_if_needed()), and scroll the viewport by a direction/amount (page.mouse.wheelorwindow.scrollBy).targetaccepts a ref (e12) or CSS selector, consistent withbrowser_click.Acceptance criteria
window.scrollY.Pointers
mcp/rustwright_mcp/server.py.mcp/tests/fixtures/.Proposed as a good first issue; a maintainer will apply the label.