Skip to main content
Glama
funkyfunc

browser-dvr-mcp

by funkyfunc

evaluate_in_context

Execute arbitrary JavaScript in any browser frame, including iframes and shadow DOM, to inspect app state, styles, or trigger custom logic.

Instructions

Execute arbitrary JavaScript in any frame context, including out-of-process iframes (OOPIFs) and shadow DOM hosts. Uses Target.setAutoAttach to discover all execution contexts automatically.

USE CASES: • Inspect React/Vue/Angular state: evaluate_in_context({ expression: "document.querySelector('#app').vue.$data" }) • Read computed styles: evaluate_in_context({ expression: "getComputedStyle(document.body).backgroundColor" }) • Trigger custom app logic: evaluate_in_context({ expression: "window.myApp.reset()" }) • Execute in an iframe: evaluate_in_context({ expression: "document.title", frameIndex: 1 })

IMPORTANT: This is the tool that replaces framework-specific macros. Instead of using a React-specific sniffer, write the exact JS introspection you need. This keeps the MCP server unopinionated.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutMsNoEvaluation timeout in milliseconds (default: 5000)
expressionNoJavaScript expression to evaluate. The result is returned as JSON. Omit to list available frames.
frameIndexNoFrame index to evaluate in (0 = main frame). Call with no args to list available frames.

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