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.
| Argument | Meaning |
|---|---|
browserId | Which browser. Optional when only one is connected. |
waitSeconds | How 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.
| Argument | Meaning |
|---|---|
browserId | Which browser. Optional when only one is connected. |
tabId | A tab from list_tabs. Give this or url, not both. |
url | Opens a background tab there, captures it, closes it again. |
windowId | Which window to open url in. Ignored with tabId. |
format | pdf (default), png, jpeg. |
pageSize | PDF only. a4 (default) and letter slice onto printable sheets with a half-inch margin; auto is one page the size of the capture. |
quality | JPEG only, 0.1 to 1. |
videoHandling | frame keeps a video's paused frame, blank leaves its area empty. |
openEditor | Also leave the capture open in a Page Scanner editor tab. |
outputPath | A file, or a directory to keep the suggested name. Defaults to the cwd. |
waitSeconds | How 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.