Skip to main content
Glama
funkyfunc

browser-dvr-mcp

by funkyfunc

atomic_interact

Perform browser interactions (click, type, drag) as a single atomic operation, preventing race conditions from DOM re-renders.

Instructions

THE PRIMARY INTERACTION TOOL. Combines element location and action into a single, uninterruptible browser engine tick. This eliminates Virtual DOM detachment race conditions that plague multi-step locate→act patterns. Uses direct CDP Input.dispatch* commands — not high-level Puppeteer abstractions.

ACTIONS: • click — Click an element. Uses spatial validation to verify the target is not occluded. • dblclick — Double-click an element (useful for canvas items or file explorers). • type — Focus an element and type text into it. Automatically clears existing content first. • clear — Clear an input element. • hover — Move the mouse to an element's center to trigger hover states. • key — Press a keyboard key (e.g., "Enter", "Escape", "Tab", "ArrowDown"). • scroll — Scroll the page (direction: "up", "down", "top", "bottom"). • drag_and_drop — Drag an element or coordinate to another element or coordinate.

LOCATOR STRATEGIES: • backendNodeId (number) — The most reliable. Obtained from get_semantic_surface output (the [id: NNN] tag on each node). • coordinate ([x, y]) — Raw pixel coordinates. Use for Canvas/WebGL or when backendNodeId is unavailable.

IMPORTANT: Always prefer backendNodeId from get_semantic_surface over CSS selectors or coordinates. backendNodeIds are assigned by the browser engine and survive React/Vue re-renders.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKey name to press (required for action="key", e.g., "Enter", "Escape", "Tab")
textNoText to type (required for action="type")
forceNoIf true, bypass spatial occlusion validation and force interaction at the element center (default: false).
actionYesThe interaction action to perform
amountNoScroll amount in pixels (default: viewport height)
offsetNoRelative [dx, dy] offset from the element center in pixels. Use when center is clipped or covered.
waitForNoTEMPORAL AWARENESS. After the action and settle time, wait for this condition to be met before returning. Eliminates the need for separate polling calls to check if your action had the expected effect. Examples: • After clicking "Submit": waitFor: { type: "text", value: "Success" } • After clicking a nav link: waitFor: { type: "url", value: "/dashboard" } • After triggering a modal: waitFor: { type: "selector", value: ".modal-dialog" } • After dismissing a toast: waitFor: { type: "selector_hidden", value: ".toast" } • After form submit: waitFor: { type: "network_idle" }
directionNoScroll direction (required for action="scroll")
timeoutMsNoMax time in ms to wait for the element to become interactable (default: 2000)
clearFirstNoFor "type": clear the input field first (default: true)
coordinateNoRaw [x, y] pixel coordinates. Use for Canvas or as fallback.
frameIndexNoTarget frame index (optional, defaults to automatic detection if backendNodeId is used).
returnDeltaNoIf true, immediately computes and returns a unified delta of what changed (DOM changes, network traffic, console logs) directly in the feedback.
settleTimeMsNoDelay in ms after the interaction completes before capturing the delta and screenshots (default: 250ms).
backendNodeIdNoThe backend DOM node ID from get_semantic_surface (the [id: NNN] tag). Preferred locator.
waitForTimeoutNoMax time in ms to wait for the waitFor condition (default: 5000). Only used when waitFor is specified.
dragToCoordinateNoRaw [x, y] pixel coordinates to drag to (required for action="drag_and_drop" if dragToBackendNodeId is not provided).
dragToBackendNodeIdNoThe backend DOM node ID to drag to (required for action="drag_and_drop" if dragToCoordinate is not provided).
Behavior4/5

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

No annotations provided, so description fully bears the burden. It reveals use of CDP Input.dispatch commands, spatial validation for click, auto-clear for type, and the temporal awareness of waitFor. Does not mention error handling or rate limits, but overall transparent.

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?

Well-structured with sections for actions, locators, and important notes. Front-loaded with core concept. Some verbosity in action list but still efficient for the complexity.

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?

Given the tool's high complexity (18 params, nested objects, no output schema), the description is remarkably thorough. Covers all actions, locators, waitFor, and edge cases. Provides sufficient context for agent decision-making.

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 baseline is 3. The description adds value by explaining locator strategies, providing waitFor examples, detailing offset use, and clarifying action-specific parameters beyond the schema.

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 clearly states it is 'THE PRIMARY INTERACTION TOOL' that combines element location and action into a single tick. It lists all actions and locator strategies, distinguishing it from sibling tools like coordinate_click and get_semantic_surface.

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?

Provides explicit guidance to prefer backendNodeId over coordinates, and explains use cases for coordinate (Canvas/WebGL). Also describes when to use each action. Does not explicitly contrast with all sibling tools but gives clear context.

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/funkyfunc/browser-dvr-mcp'

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