browser_take_snapshot
Look at a tab: returns one line per element, the page position, the tab's URL and title, any popups blocking it, and a snapshotId.
Instructions
Look at a tab: returns one line per element, the page position, the tab's URL and title, any popups blocking it, and a snapshotId. Every actionable element carries a number (emsn) at the start of its line; a link inside a sentence stays in it as words, number 12 — act on the number, never on pixel coordinates. Take a fresh snapshot after anything that changes the page, to see what it became: elements that appear have no number until then. Says so when the page is a PDF, a browser error page or a crashed tab, each of which makes the obvious next move useless. Give tabIds to look at several tabs in one call; each comes back with its own snapshotId. Marks on a line: collapsed (in a closed section: open it first), modal (the page outside it takes no clicks), hover-only (may do nothing on a click), also dblclick / drag / ... (other listeners, perhaps only tracking; the list misses some: a list item without drag may still drag, a spreadsheet cell without right_click may still take one: try it and snapshot), options (a dropdown's choices), readonly (takes no typing; clicking it often opens the page's picker), aria-readonly (the page says not to type, typing still goes in).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "browser_take_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | No | Tab to act on. Defaults to the foreground tab of that window. | |
| format | No | text (default): one line per element, several times smaller. json: the browser's raw annotatedContent tree, for tools that parse it themselves. | |
| tabIds | No | Several tabs at once, in any windows, instead of tabId. | |
| windowId | No | Window to act on. Defaults to the frontmost window. | |
| showLinks | No | Mark each link with a footnote, [^3], and list the addresses after the elements. Turn it on when you need addresses: to hand search results to browser_read_pages, or to see where a link goes. A page may change a link on click; to be sure of the address, open it. | |
| timeoutMs | No | How long to wait for the page to settle. | |
| changesSince | No | snapshotIds of earlier snapshots, at most one per tab: each tab then gives only the lines new or changed (+) and gone (-) since its own, with the lines they sit in. A tab with none, on another page now, or whose changes would be longer than it, comes whole and says why. Not with showLinks or format json. | |
| includeImage | No | Also return the annotated screenshot. Off by default because images are large; turn it on when the page needs looking at (dates, layout, visual confirmation). | |
| readWholePage | No | Read the page around the screen too (about 8000px each way), not just the screen. The image stays one screen; lines off it are marked offscreen and are still acted on by emsn. Several times larger, so use it to search or read a whole page, not on every look. |