web-search

Public

16 Downloads

README

jorbraken/web-search

Give LLMs tools to search the web, fetch pages, and extract clean, cited Markdown content.

Tools

  • search_web(query, count?) — searches the web and returns title, url, snippet, source, and published_date for each result. Uses a local SearXNG instance by default, falling back to the Brave Search API if SearXNG is unreachable or errors out.
  • fetch_page(url, offset?) — fetches a page, strips navigation/ads/scripts, and returns the main content as Markdown along with citation metadata (title, url, source, published_date). Long pages are returned in chunks; pass offset to continue reading a page from where the previous chunk left off.

Configuration

  • SearXNG Base URL — base URL of a SearXNG instance used as the primary search provider (default http://192.168.66.2:8888).
  • Brave Search API Key — API key used as a fallback search provider when SearXNG is unavailable. Leave empty to disable the fallback.
  • Brave Search Base URL — base URL for the Brave Search API.
  • Default Result Count — number of search results returned when count isn't specified.
  • Fetch Chunk Size — max characters of extracted content returned per fetch_page call.
  • Fetch Timeout (ms) — timeout for search and page fetch requests.

Limitations

  • Only extracts text/html pages; PDFs, images, and other content types are not supported.
  • Extraction quality depends on @mozilla/readability and may vary on non-article pages (e.g. heavily JS-rendered SPAs).