fetchWebContent
Fetch readable web pages, docs, and PDFs from public URLs, stripping ads while preserving code and tables. Scope by CSS selector, page long text, or extract structured JSON for research.
Instructions
Fetch readable web content/docs/PDFs from public URLs. Auto-cleans ads, keeps code/tables. Batch urls (1-3), CSS selector scoping, bm25 focus, startIndex paging, cache, schema extract to JSON, citations, link retention.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Return the raw response body (HTML/plain text) without extraction | |
| url | No | ||
| urls | No | Batch URLs (1~3 URLs run concurrently, splitting maxChars budget; ideal for comparing search results) | |
| cache | No | Cache mode: 'default' uses disk Markdown cache; 'reload' forces re-fetching upstream | |
| focus | No | Keyword or section name to target (e.g. 'Auth', 'Config'); returns targeted window (~5000 chars) instead of burning tokens on full document | |
| format | No | Content format (default: 'markdown' when raw is false): 'markdown' preserves headings, lists, fenced code blocks (with language) and GFM tables — better for technical docs; use 'text' for plain text | |
| extract | No | Extract structured JSON instead of markdown, using CSS selectors — no LLM needed. fields: [{name, selector, type: text|html|markdown|attribute|list, attribute?, fields?, all?}]; selector '@attr' reads an attribute of the current node | |
| maxChars | No | ||
| selector | No | CSS selector: return only the matched subtree, keeping code blocks and tables. Use when auto-extraction grabs the wrong container. Errors instead of silently returning the whole page when nothing matches | |
| citations | No | Rewrite inline links as numbered citations and append a '## References' list, so the answer can cite sources | |
| focusMode | No | How focus selects text: 'bm25' (default) ranks paragraphs by relevance and keeps the best ones; 'window' keeps the old ±2500-char window around the first match | |
| startIndex | No | Character offset to start reading from (for paging through long content) | |
| readability | No | ||
| retainLinks | No | Inline link retention: 'all' (default) keeps [label](url); 'text' keeps only the label (strips URLs, big win on index/list pages); 'none' removes the link entirely. Ignored inside code blocks | |
| includeLinks | No |