| description | Universal web tool — fetches and interacts with web pages through
real Chromium (Playwright). Renders JavaScript, follows redirects,
handles cookies, bypasses many anti-scrape stubs that block plain
`web_fetch`. Each call launches a fresh browser, executes the
requested flow, closes. ~2-3s cold start; no persistent state.
Use INSTEAD of `web_fetch` when:
- Target is a JS-heavy SPA (prices via XHR, lazy content)
- `web_fetch` returned an anti-scrape placeholder (Zhihu's
"click here" stub, JD's chrome-only HTML)
- You need to interact (click, fill input) before extracting
Common patterns:
fetch rendered text: url=X
wait for content then read: url=X wait_for=".price"
extract specific element: url=X selector=".product-list"
click and read result: url=X click=".search-button"
fill form, then read: url=X click="input[name=q]" type_text="kinclaw"
fill + Enter (React forms): url=X click="input" type_text="hi" press_enter=true wait_for=".reply"
screenshot the page: url=X screenshot=true (returns image:// marker)
run JS and get result: url=X js="document.title"
First-time setup (one-time per machine, ~500MB Chromium download):
pip install playwright
playwright install chromium
|
| args | ["{{url}}","{{wait_for}}","{{selector}}","{{click}}","{{type_text}}","{{screenshot}}","{{js}}","{{timeout_ms}}","{{press_enter}}","{{screenshot_selector}}","{{screenshot_full_page}}","{{pdf}}","{{pdf_format}}","{{session_id}}","{{upload_selector}}","{{upload_files}}"] |
| schema | {"url":{"type":"string","description":"Target URL to load. Required.","required":true},"wait_for":{"type":"string","description":"Optional CSS selector to await visibility before extracting (e.g. \".price\", \"#main\"). Useful for SPAs where content arrives via XHR."},"selector":{"type":"string","description":"Optional CSS selector for the element whose inner text to return. Default body (full page text)."},"click":{"type":"string","description":"Optional CSS selector to click after load, before extracting. Combined with type_text, fills an input."},"type_text":{"type":"string","description":"Text to fill into the click target (only used with click=). Useful for search boxes."},"screenshot":{"type":"string","description":"Set to \"true\" to return a PNG of the viewport (with image:// marker for vision-capable brains). When true, no text is returned."},"js":{"type":"string","description":"JavaScript expression to evaluate in the page context. Result is JSON-stringified. When set, no other extraction happens."},"timeout_ms":{"type":"integer","description":"Max ms for goto and wait operations. Default 15000."},"press_enter":{"type":"string","description":"Set to \"true\" after fill to send a real Enter keypress on the\ninput — works for React/Vue/Svelte chat forms whose submit\nbutton is gated on internal state and won't enable from a fill\nalone. Real keyboard event (page.press), not synthetic. Use\nwith click=<input selector> + type_text=<message>.\n"},"screenshot_selector":{"type":"string","description":"When set with screenshot=true, capture only the bounding box of\nthis CSS selector instead of the full viewport. Falls back to\nviewport if the selector is offscreen / zero-sized. Useful for\ngrabbing just a chart, just a card, just a paragraph.\n"},"screenshot_full_page":{"type":"string","description":"When \"true\" (and screenshot=true, no screenshot_selector),\ncapture the FULL scrollable page rather than just the viewport.\nLong articles / infinite-scroll content in one shot.\n"},"pdf":{"type":"string","description":"Set to \"true\" to render the page as a PDF instead of HTML\nextraction. Mutually exclusive with screenshot=true. Headless\nChromium's print-pdf engine — high quality, includes JS-rendered\ncontent + computed CSS + background images. Default A4.\n"},"pdf_format":{"type":"string","description":"Page format for PDF mode (A4, Letter, Legal, A3, etc.). Default A4.\n"},"session_id":{"type":"string","description":"When set, persist storage state (cookies, localStorage) under\n~/.kinclaw/web-sessions/<session_id>.json. First call writes;\nsubsequent calls with same session_id load + reuse. Lets a\nsoul log into a site once and run multiple fetches without\nre-authenticating. Pair with --click=<login form> +\n--type-text=<creds> on the first call.\n"},"upload_selector":{"type":"string","description":"CSS selector for an <input type=file> element. Pair with\nupload_files= to populate the input via Playwright's\nset_input_files (fires change events the page expects). For\nhidden file inputs (drag-drop overlays), most still work via\nthe underlying input element.\n"},"upload_files":{"type":"string","description":"Comma-separated absolute file paths to upload via\nupload_selector. Examples: \"/Users/me/photo.jpg\" or\n\"/tmp/a.pdf,/tmp/b.pdf\" for multi-file inputs.\n"}} |