Skip to content

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]
  • 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.

When the agent needs full page content (not just a snippet), the service:

  1. Fetches raw HTML (5-second timeout)
  2. Parses with JSDOM + Readability
  3. Strips navigation / ads / boilerplate
  4. Returns first 10 000 chars of clean text

Automatic when the agent follows a link from search results.

Per result:

FieldSource
URLLink href from search results
Title<title>og:titletwitter:title fallback chain
Favicon<link rel="icon"> → Google favicon service fallback
ContentReadability-extracted text (when full article requested)
SettingDefaultPurpose
tavily.apiKeyTavily API key