Web Search
The web_search tool queries the web via Tavily. Results are reranked to favor authoritative developer sources; when the agent needs full article text, Mozilla Readability extracts clean content.
{ "tavily.apiKey": "tvly-..." }Get a key at tavily.com. Free tier: 1000 searches/month.
graph TB
A[Agent calls web_search<br/>query='React server components SSR'] --> B[WebSearchService<br/>Build search URL]
B --> C[Fetch results page<br/>Extract up to 12 URLs]
C --> D[Extract metadata<br/>title, favicon, OG tags]
D --> E[UrlReranker<br/>Boost priority sites, score by authority]
E --> F[Fetch top articles<br/>Readability, 10 000 chars each]
F --> G[Return structured results<br/>URL, title, content snippet]
Priority sites (boosted in ranking)
Section titled “Priority sites (boosted in ranking)”- Official docs: MDN, React, Node.js, Python, TypeScript, Rust, Go, Kubernetes, Docker
- Q&A: Stack Overflow, GitHub Discussions
- Blogs: Dev.to, Medium engineering blogs, Hacker News
- References: Wikipedia, RFC Editor
UrlReranker assigns higher scores to results from priority domains — authoritative sources appear first.
Article extraction
Section titled “Article extraction”When the agent needs full page content (not just a snippet), the service:
- Fetches raw HTML (5-second timeout)
- Parses with JSDOM + Readability
- Strips navigation / ads / boilerplate
- Returns first 10 000 chars of clean text
Automatic when the agent follows a link from search results.
Metadata extraction
Section titled “Metadata extraction”Per result:
| Field | Source |
|---|---|
| URL | Link href from search results |
| Title | <title> → og:title → twitter:title fallback chain |
| Favicon | <link rel="icon"> → Google favicon service fallback |
| Content | Readability-extracted text (when full article requested) |
Settings
Section titled “Settings”| Setting | Default | Purpose |
|---|---|---|
tavily.apiKey | — | Tavily API key |
Related
Section titled “Related”- Smart reader — direct URL reader for known links
- Browser automation — for pages requiring JS render