browser_extract
Extract current visible content and structured page state from a tab, then query CSS selectors, read logs, inspect elements, or audit pages.
Instructions
Extract the complete current visible content and structured field/page state from a tab. Pass target_ref to scope a fresh read to an observed content block, control or the ARIA region it owns. This is a fresh high-level read, not a change-only observation. If a large result returns evidence_ref and next_cursor from browser_extract, continue it with this same tool. Do not continue a managed-output reference from browser_open, browser_observe, or browser_act; start a fresh extraction with tab_id and instruction instead. Pass selector for an instant CSS query instead of a full read: it counts and lists matching elements (tag, text, requested attributes, and the ref of any match already in the current observation) without building a snapshot, e.g. every product link's href, how many rows a table has, or each card's price. read=console|network reads the tab's logs (with same-site error bodies); read=inspect with target_ref says why a click is refused or a control will not take a value: what receives the click there, what covers or clips it, disabled state, styles. read=design returns how the page looks in CSS terms: variables, colors by use, type scale, radii, shadows, spacing and layout regions with sizes; target_ref limits it to one component. read=audit audits the page you are on (a deployed or localhost site): accessibility violations (axe-core) with the ref of each element, load timings and weight, title/lang/description/headings/alt gaps, broken same-origin links and console errors, worst first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| find | No | Return every passage that mentions this, with the words around it, instead of the page's text. Use it when the page is long and the question is narrow (a deadline, a price, a name). | |
| read | No | ||
| level | No | ||
| limit | No | Continuation only: maximum characters for this slice; defaults to 8000. | |
| types | No | read=network: e.g. ['fetch','xhr']. | |
| checks | No | read=audit: which checks to run; omit for all four. | |
| cursor | No | With evidence_ref: character offset from next_cursor. With selector or log reads: entry offset from next_cursor. Defaults to 0. | |
| filter | No | read=network: URL regex, e.g. '/api/'. | |
| tab_id | Yes | ||
| from_end | No | Read the end of the page rather than the beginning. Footers, totals and closing dates live there, and paging forward charges for everything above them. | |
| selector | No | CSS selector to query instead of reading the page (e.g. 'table tbody tr', 'a.product-link', 'article h2'). Returns total, and for each match up to max_results: tag, text, attrs, children_count, visible, and ref when the element is in the current observation. An invalid selector is an error; no match is an empty result, not an error. | |
| attributes | No | selector only: attributes to return per match, e.g. ['href'] or ['src', 'alt']. href/src are complete absolute URLs, or explicitly omitted when longer than 8192 characters. Other attributes are bounded previews. value is the live field value (secrets read as [redacted]). | |
| target_ref | No | Fresh extraction, read=inspect or read=design: exact ref from the current observation (read=design also takes a region id r…). Reads that element, or the uniquely related region named by aria-controls, without executing page JavaScript in the model loop. | |
| failed_only | No | read=network: failed or 4xx/5xx only. | |
| instruction | No | Fresh extraction: optional objective used to focus field state and report an explicit no-match result. Continuation: accepted as a harmless repeated hint but archived evidence is returned unchanged. | |
| max_results | No | selector or log reads: entries per page (default 50). total always counts every match; continue with cursor=next_cursor. | |
| navigations | No | ||
| evidence_ref | No | Continuation only: opaque evidence_ref returned by an earlier browser_extract result in this session, accompanied by next_cursor. | |
| include_text | No | selector only: include each match's text (default true). Set false when only attributes or the count matter. |