API Reference
formatBrowserSnapshot
function formatBrowserSnapshot(snapshot): string;Defined in: tools/builtin/browser.ts:107
Render a page snapshot into the single text block handed to the model.
Parameters
| Parameter | Type | Description |
|---|---|---|
snapshot | BrowserSnapshot | The page captured by a BrowserSession action. |
Returns
string
The header followed by the element list, or a (no interactive elements) note when empty.
Remarks
A header line (title — url) precedes one [ref] role "name" line per
interactive element — the addressing the model quotes back into
browser_click / browser_type. A page with no interactive elements yields a
clear note in place of the element list.