A single-tool LM Studio plugin that gives the AI model one-call internet research.
The model calls deep_search with a query string and gets back a formatted, token-safe report — no chaining required.
What it does (3-phase pipeline)
Phase
What happens
1 – Search
Queries DuckDuckGo HTML endpoint. If DNS / network fails, automatically falls back to Google.
2 – Scrape
Visits each of the top N result URLs in parallel using axios + cheerio. Strips scripts, styles, navbars, footers, cookie banners, ads. Extracts clean prose from <article> / <main> / <body>.
3 – Report
Combines all extracts into one formatted Markdown string, hard-capped at 4 000 characters to protect the model's context window.
Critical fixes over the original plugins
Problem
Fix
getaddrinfo ENOTFOUND (DNS failures)
dns.setServers(['8.8.8.8', '8.8.4.4']) applied at module load; DuckDuckGo → Google fallback.
Fetch blocked by target sites
axios with 19-entry User-Agent rotation + proper Referer/Sec-Fetch-* headers.
Raw HTML flooding context
cheerio removes all non-content nodes before extracting text.
Context window overflow
Per-site char limit + hard global cap of 4 000 chars.
Two tools confusing the model
One tool only: deep_search.
Installation
Plugin settings (LM Studio UI)
Setting
Default
Description
URLs to Scrape
3
How many top search results to visit (1–5)
Max Chars Per Site
1200
Character limit per scraped page
Safe Search
auto
Strict / Moderate / Off / Auto
Tool schema
Dependencies
Package
Purpose
@lmstudio/sdk
LM Studio plugin API
axios
Reliable HTTP with gzip, redirect handling, DNS respect
cheerio
Fast server-side HTML parsing and content extraction
zod
Parameter schema validation
npm installlms dev # local development / hot-reloadlms push # deploy to LM Studio
Tool name: deep_searchParameters: query string (required) The research question numResults int 1-5 (optional) Override URLs-to-scrape setting safeSearch enum (optional) "strict" | "moderate" | "off"