docs-discovery
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocumentation Discovery
文档发现
Mission: Find official library/framework documentation quickly.
目标: 快速找到官方库/框架文档。
Strategy
策略
Step 1: Try context7 First
步骤1:优先尝试context7
mcp__context7__resolve-library-id("{library}")
→ Success? → mcp__context7__get-library-docs("{id}", topic="{topic}")
→ Fail? → Step 2mcp__context7__resolve-library-id("{library}")
→ 成功?→ mcp__context7__get-library-docs("{id}", topic="{topic}")
→ 失败?→ 步骤2Step 2: Search for Documentation URLs
步骤2:搜索文档URL
If context7 fails, run these searches in parallel:
WebSearch: "{library} llms.txt"
WebSearch: "{library} official documentation"如果context7失败,并行运行以下搜索:
WebSearch: "{library} llms.txt"
WebSearch: "{library} official documentation"Step 3: Fetch Found URLs
步骤3:获取找到的URL
WebFetch the URLs found from Step 2:
- llms.txt links → fetch and parse
- Documentation pages → fetch and extract content
获取步骤2中找到的URL内容:
- llms.txt链接 → 获取并解析
- 文档页面 → 获取并提取内容
Workflow Summary
工作流程总结
1. context7 (fast, curated)
↓ fail
2. WebSearch (parallel):
- "{library} llms.txt"
- "{library} official documentation"
↓ found URLs
3. WebFetch found URLs
↓ content
4. Parse & present to user1. context7(快速、已整理)
↓ 失败
2. 网页搜索(并行):
- "{library} llms.txt"
- "{library} official documentation"
↓ 找到URL
3. 获取找到的URL内容
↓ 内容
4. 解析并呈现给用户Tools
工具
| Step | Tool | Purpose |
|---|---|---|
| 1 | | Get context7 library ID |
| 1 | | Fetch docs from context7 |
| 2 | | Search for llms.txt and docs URLs |
| 3 | | Fetch documentation content |
| 步骤 | 工具 | 用途 |
|---|---|---|
| 1 | | 获取context7库ID |
| 1 | | 从context7获取文档 |
| 2 | | 搜索llms.txt和文档URL |
| 3 | | 获取文档内容 |
Key Rules
关键规则
- context7 first - Fastest, already curated
- Search, don't guess - Don't guess URL patterns, search for them
- Parallel search - Run multiple WebSearch queries together
- Topic filtering - Use topic param in context7, filter search results by topic
- 优先使用context7 - 速度最快,已整理完成
- 搜索而非猜测 - 不要猜测URL模式,直接搜索
- 并行搜索 - 同时运行多个WebSearch查询
- 主题过滤 - 在context7中使用topic参数,按主题过滤搜索结果