Improve MCP documentation search and issue-reporting discovery
Author: kofCreated Aug 19, 2026Updated Sep 28, 2026
Labelsarea:clitype:featcomplexity:mediumprio:2area:aiarea:mcp
Problem
Webstudio's CLI and MCP can guide agents only with knowledge that is bundled into tool descriptions, already present in model context, or found through broad source inspection. This can be incomplete, stale, slow, and expensive in model context. It also allowed the issue reporter to submit #6175 without first finding the documented and previously supported behavior or checking whether an equivalent issue already existed.
Desired outcome
Give every Webstudio CLI installation fast, focused access to the complete authoritative product documentation without placing the full documentation set in the model context.
The issue reporter should use the same knowledge access before creating an issue:
- Search existing GitHub issues and show a likely duplicate to the user.
- Search current product documentation and show relevant supported behavior.
- Create a report only when neither source resolves the request.
Product scope
- Fetch an authoritative documentation snapshot on first use instead of permanently bundling a snapshot with the CLI.
- Persist the snapshot in the CLI's local cache so repeated searches do not download or scan the documentation again.
- Check a small remote version manifest, content hash, ETag, or equivalent freshness signal when the CLI starts.
- Refresh changed documentation when online. When offline, continue using the cached snapshot and expose its version or age so agents do not mistake it for current knowledge.
- Provide a focused search operation that returns ranked excerpts, titles, paths, and canonical documentation URLs. Only the selected results should enter model context.
- Reuse the search operation in MCP discovery and the issue-reporting workflow.
- Keep installation size, startup latency, memory use, and dependencies small enough for every CLI user.
Constraints
- The Builder repository's
docs/directory remains the authoritative source. - A failed update check must not prevent normal offline CLI use.
- Freshness checking, snapshot download/indexing, query execution, and model-context transfer must be measured and reported separately.
- Results must retain source/version metadata and be deterministic enough for agent workflows.
- Search must handle exact product terms, natural-language descriptions, minor wording differences, and common misspellings without broad irrelevant retrieval.
- Do not require loading the entire documentation corpus into the model context.
- GitHub duplicate search and documentation search are separate checks; one must not silently replace the other.
Acceptance criteria
- A new CLI installation can fetch and build or load the current documentation snapshot.
- Subsequent starts perform a lightweight freshness check and avoid downloading or rebuilding unchanged content.
- Offline starts use the cached snapshot and clearly report its freshness metadata.
- MCP exposes a compact documentation search interface with ranked, source-linked excerpts.
- A representative evaluation set covers exact terms, conceptual requests, wording differences, misspellings, and unsupported requests, with explicit relevance and latency targets.
- The issue reporter presents likely existing issues before submission.
- When no duplicate exists, the reporter presents documentation for already-supported behavior before submission.
- The workflow allows submission when the user confirms the documentation or existing results do not resolve the problem.
- Documentation explains cache location, refresh behavior, offline behavior, and how an agent can request a fresh search.
Open implementation questions
- Whether a compact lexical index (for example BM25 plus prefix/fuzzy matching) meets the evaluation targets or a small local embedding model/index is justified.
- Whether the published snapshot should contain Markdown, pre-chunked records, a prebuilt index, or a combination.
- How frequently startup checks should run and whether refresh should block startup or happen in the background.
- How duplicate-issue candidates should be ranked alongside documentation results without conflating the two sources.
Related: #6177
Source: webstudio-is/webstudio