Views
No views yet
web_search(query, max_results=10, freshness=None, site=None)
title, url, source, snippet, and rank.read_url(url, query=None, render=False)
final_url, status_code, content_type, title, summary, text, links, and evidence. Captcha or anti-bot blocks return ok=false, blocked=true, block_type, and block_marker.discover_links(url, query=None, render=False, file_types=None, limit=50)
file_types=["pdf"] or similar when the model needs source documents.research_web(query, max_results=8, read_top=4, freshness=None, site=None, render=False)
sources, evidence, citations, structured failures, blocked_sources, and manual_visit_links.1python -m venv .venv
2.venv\Scripts\activate
3pip install -r requirements.txt
4python -m playwright install chromium
5python -m mcp_server.serverhttp://127.0.0.1:8000/mcpMCP_TRANSPORT=stdio as shown in mcp.json.example.research_web for most online questions.web_search when the model needs to inspect candidate URLs first.read_url for a specific source the user or search results provide.discover_links when a page likely contains PDFs, reports, docs, datasets, or follow-up source links.render=True in read_url, discover_links, or research_web when pages need JavaScript rendering.read_url now returns page links, and discover_links can filter for PDFs and other online files.1WEB_RESEARCH_LOG_PATH=.runtime/web_research.log
2ALLOWED_DOMAINS=
3USER_AGENT=Mozilla/5.0 ...
4REQUEST_TIMEOUT=25
5MAX_CONTENT_CHARS=120000
6MCP_TRANSPORT=streamable-http
7MCP_HOST=127.0.0.1
8MCP_PORT=8000
9BROWSER_HEADLESS=true
10BROWSER_TIMEOUT_MS=30000
11BROWSER_MAX_CONTENT_CHARS=60000
12BROWSER_LOCALE=en-US
13BROWSER_TIMEZONE_ID=Asia/Calcutta
14BROWSER_PROFILE_DIR=freshness supports day, week, month, and year when the underlying free search page honors the filter. ALLOWED_DOMAINS is optional and supports comma-separated wildcard patterns. BROWSER_PROFILE_DIR is optional; leave it empty for per-request browser profiles.render=True uses Chromium through Playwright. BROWSER_HEADLESS=true keeps that browser in the background; set BROWSER_HEADLESS=false only when you need to watch or manually debug an authorized session.python -m unittest discover -s tests -vresearch_web skips blocked sources and continues with other live results.research_web tries safe same-domain recovery candidates such as print, AMP, PDF, RSS, feed, and sitemap URLs. Successful recovered sources include recovered_from; blocked failures include recovery_attempts.manual_handoff guidance, and research_web returns top-level manual_visit_links that clients should show to the user. If you are authorized to access a page, open it manually, complete the site check yourself, then retry with an explicit BROWSER_PROFILE_DIR.read_url returns a structured blocked response:1{
2 "ok": false,
3 "blocked": true,
4 "block_type": "captcha",
5 "block_marker": "captcha"
6}research_web keeps going with other live results and also returns blocked_sources and manual_visit_links. Clients should show manual_visit_links directly to the user so they can open blocked pages in their own browser when they are authorized to do so. The tool does not use proxy rotation, captcha-solving services, or stealth-driver bypasses.research_web also tries safe same-domain alternates:sitemap.xml, RSS, and feed endpointsrecovered_from. If none work, the blocked failure includes recovery_attempts.