nokk
v0.1.50a1Headless browser for AI agents: passes Cloudflare challenges and reads pages as Markdown.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
open
Load a page in the browser and wait until it has loaded. Returns the final `url` and `title`. A Cloudflare challenge on the way is solved first (unless the server runs with `--no-auto-solve`); `challenge` then reports `kind`, `solved` and `remaining` (`"none"` once through). Call this before the other tools.
| Parameter | Type | Description |
|---|---|---|
url * | string | Absolute address to load, e.g. `https://example.com/`. |
solve_challenge
Solve the Cloudflare challenge on the current page: the "Just a moment..." page or a Turnstile widget, pressing its checkbox if it shows one. Only needed when `open` ran with auto-solve off or a widget appeared later. Returns `status`, `solved`, `remaining`, `title` and `url`.
| Parameter | Type | Description |
|---|---|---|
timeout_seconds | number | How long to wait for the challenge to clear, in seconds. |
challenge_state
Report whether the current page is behind a bot check. `kind` is `"none"` when the page itself is shown, else the kind of check (`"cloudflare-interstitial"`, `"turnstile-widget"`, `"aws-waf"` and others); `solvable` says whether `solve_challenge` can clear it.
snapshot
Show the current page as a compact outline: headings and text in reading order, and every link, button and form field numbered (`[e12]`) with its name, address or value. Pass a ref to `click` or `fill`. Far smaller than `read_html`; take a new snapshot after the page changes. `null` when `selector` matches nothing.
| Parameter | Type | Description |
|---|---|---|
max_chars | integer | Cut the outline after this many characters. |
selector | string | CSS selector of one element; empty for the whole page. |
read_page
Read the current page: its main content as Markdown, with headings, lists, tables, code and links, and without navigation, headers, footers, cookie banners or hidden parts. The best tool for reading an article, docs or a listing. A long page comes in parts; the text ends with the `offset` of the next. `null` when `selector` matches nothing.
| Parameter | Type | Description |
|---|---|---|
links | string | "inline" ([text](url)), "refs" (numbered, listed at the end) or "none". |
max_chars | integer | Characters per part; a longer page comes in parts. |
offset | integer | Where the part starts, as the previous part says (with the same `links`). |
selector | string | CSS selector of one element; empty for the whole page. |
read_text
Return the visible text of the current page, or of the first element matching `selector`. `null` when no element matches.
| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector of one element; empty for the whole page. |
read_html
Return the HTML of the current page as it is now (after its scripts ran), or the outer HTML of the first element matching `selector`. `null` when no element matches.
| Parameter | Type | Description |
|---|---|---|
selector | string | CSS selector of one element; empty for the whole page. |
click
Click an element: a ref from `snapshot` or the first match of a CSS selector. Returns `true`; fails when nothing matches or the ref is stale.
| Parameter | Type | Description |
|---|---|---|
target * | string | A ref from the last `snapshot`, e.g. `e12`, or a CSS selector, e.g. `#price`, `form input[name=q]`. |
fill
Type `value` into a form field: a ref from `snapshot` or the first match of a CSS selector (its `input` and `change` events fire, as when a person types). Returns `true`; fails when nothing matches or the ref is stale.
| Parameter | Type | Description |
|---|---|---|
target * | string | A ref from the last `snapshot`, e.g. `e12`, or a CSS selector, e.g. `#price`, `form input[name=q]`. |
value * | string | Text to put in the field. |
evaluate
Run a JavaScript expression in the current page and return its value as JSON (a promise is awaited). For data the other tools do not read.
| Parameter | Type | Description |
|---|---|---|
expression * | string | JavaScript expression, e.g. `document.title` or `[...document.querySelectorAll('h2')].map(e => e.textContent)`. |
links
Return the absolute addresses of all links on the current page.
reset
Close the browser session: cookies and page state are dropped, and the next `open` starts a fresh one.