chrome_use_eval
Run JavaScript in a page's main world and return its result to inspect or change live state while page handlers fire.
Instructions
Run JavaScript in the page's main world (state persists, page handlers fire) and return its result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | With tabId: act on a tab this session does not own (the user's own, or another session's), in place and in the background (--tab <handle> --force). Only when the user asked you to act on that tab; the result has forced: true and the tab's title and url. | |
| frame | No | Run in this frame's context instead of the main frame (CSS selector, @ref, URL substring, or frame index). | |
| tabId | No | Target tab id (e.g. t2), label, or targetId (--tab). | |
| script | Yes | JavaScript to evaluate. | |
| session | No | Isolated session name (chrome-use --session <name>). Each session gets its own tab group, browser tab and element refs. Omit it unless several agents share ONE MCP server — the session is otherwise derived per agent automatically. When you do share a server with sibling agents, pass a name unique to you on every call, or you will drive their tabs and invalidate their refs. | |
| timeoutMs | No | Kill the underlying chrome-use process if it hasn't responded after this many ms (default 30000). |