Skip to main content
Glama
Browser Session MCP

Browser Session MCP

swipe

Destructive

Simulate real touch swipes on a mobile browser session to close drawers, move carousels, scroll, or trigger pull to refresh. Define start point, direction, distance, and speed.

Instructions

Swipe a finger across the session's active tab with real CDP touch input (touchstart, touchmove, touchend, and the matching pointer events), e.g. to close a drawer, move a carousel, pull to refresh or scroll the way a phone does. Start on an element (selector, or plain words as for click), at x,y, or by default the middle of the screen; end distance pixels away in direction (default 60% of the screen along that axis) or exactly at toX,toY. durationMs sets the speed (default 300): short and slow drags a drawer partway, to check it snaps back. Use it on mobile sessions (open_browser_session with useMobileUA); pages that listen only for mouse events won't react. Returns where the swipe started and ended.

Input Schema

NameRequiredDescriptionDefault
xNoStart, horizontal viewport coordinate, used with `y` when no selector is given.
yNoStart, vertical viewport coordinate, used with `x` when no selector is given.
toXNoEnd, horizontal viewport coordinate, with `toY`; overrides `direction`.
toYNoEnd, vertical viewport coordinate, with `toX`; overrides `direction`.
timeoutNoMilliseconds to wait for `selector` to appear. Default 5000.
distanceNoHow far to move in `direction`, in CSS pixels. Default 60% of the screen's width (left, right) or height (up, down).
selectorNoElement to start on (its center): a CSS selector, or plain words as for click.
directionNoWhich way the finger moves. Needed unless `toX` and `toY` are given.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.
durationMsNoHow long the finger takes to move, in milliseconds. Default 300.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.18

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and non-idempotency, so the safety profile is covered; the description adds real behavioral context beyond them, namely the exact event sequence synthesized, the mobile-only constraint, and the fact that it returns where the swipe started and ended. It stops short of describing failure modes (e.g. what happens if no element matches the selector) beyond the timeout parameter.

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 core action and mechanism lead the first clause, and the parameter and usage notes follow in a logical order with no filler sentences. It is dense and somewhat long, and a few default values are restated from the schema, but each sentence carries information an agent would otherwise have to infer.

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 10-parameter tool with no output schema, the description covers starting point, ending point, timing, the mobile precondition, and even the shape of the return value (start and end coordinates). Nothing an agent needs to invoke it correctly appears to be missing.

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 coverage is 100%, so the baseline is 3, but the description goes further by explaining the interaction between parameters: start from selector/x,y or default to screen center, end via distance+direction or exact toX/toY (which overrides direction), and the short-plus-slow combination that drags a drawer partway to test snap-back. That interpretive guidance on combining distance and durationMs is meaning the schema alone does not convey.

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?

Names a specific verb (swipe) and resource (finger across the session's active tab) and pins down the mechanism: real CDP touch input with touchstart/touchmove/touchend plus pointer events. The examples (close a drawer, move a carousel, pull to refresh, phone-style scroll) separate it from siblings like scroll, tap, and move_mouse without the agent needing to open the schema.

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?

Explicitly scopes use to mobile sessions opened with useMobileUA and warns that mouse-event-only pages won't react, which is a real when-not condition. It doesn't explicitly route the agent to a named alternative (e.g. scroll or move_mouse) for desktop or wheel-style input, so the alternative is implied rather than stated.

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