Docs

Tools

pair, list_browsers, list_tabs and scan_page, with every argument.

pair

Writes the pairing and returns the port and token to paste into Chrome. One optional argument, rotate, which issues a new token and invalidates the old one. See the note in Pairing about the token reaching the transcript.

list_browsers

No arguments. The Chrome profiles paired and connected right now, with the name you gave each one and how long it has been connected. Start here when more than one is connected.

list_tabs

The windows and open tabs of one browser. Tabs carry the windowId they belong to, and windows say which is focused, so an agent can pick a window as well as a tab.

ArgumentMeaning
browserIdWhich browser. Optional when only one is connected.
waitSecondsHow long to wait for a browser to connect. 0 fails immediately.

scan_page

Captures a page and writes it to disk. Returns the absolute path.

ArgumentMeaning
browserIdWhich browser. Optional when only one is connected.
tabIdA tab from list_tabs. Give this or url, not both.
urlOpens a background tab there, captures it, closes it again.
windowIdWhich window to open url in. Ignored with tabId.
formatpdf (default), png, jpeg.
pageSizePDF only. a4 (default) and letter slice onto printable sheets with a half-inch margin; auto is one page the size of the capture.
qualityJPEG only, 0.1 to 1.
videoHandlingframe keeps a video's paused frame, blank leaves its area empty.
openEditorAlso leave the capture open in a Page Scanner editor tab.
outputPathA file, or a directory to keep the suggested name. Defaults to the cwd.
waitSecondsHow long to wait for a browser to connect. 0 fails immediately.

What comes back

The absolute path, the capture's width and height in CSS pixels, the mode (vector or raster), selectableText, and truncated.

selectableText is true only for a PDF that came out of the vector pipeline, which is the thing an agent should check before promising the text is real. truncated is null when the capture was whole, and otherwise carries what the page measured, what was captured, and a sentence naming the gap.

On this page