Expand description
Web & research context layer.
Turns an arbitrary URL (web page or YouTube video) into compressed, citation-backed context for an agent. The flow is:
url_guardvalidates the URL and blocks SSRF targets.fetchdownloads it (bounded, manual-redirect, SSRF-revalidated) — oryoutubepulls a transcript for video URLs.html_to_textrenders HTML to clean Markdown.distillapplies the requested research-compression mode.citationattaches source attribution.
The single entry point is read_url; the crate::tools::registered::ctx_url_read
MCP tool is a thin wrapper over it.
Modules§
- citation
- Evidence / citation metadata attached to every fetched document.
- distill
- Extractive research-compression modes for prose and transcripts.
- fetch
- Bounded, SSRF-aware HTTP fetch built on
ureq. - html_
to_ text - Dependency-free HTML → Markdown / plain-text conversion.
- PDF → text extraction for the research context layer.
- url_
guard - URL validation and SSRF protection for outbound fetches.
- youtube
- YouTube transcript adapter (no API key required).
Structs§
- Read
Options - Parameters for
read_url. - Read
Result - Result of a successful
read_url.
Enums§
- Read
Mode - How fetched content should be distilled before returning.
Constants§
- DEFAULT_
MAX_ ITEMS - Default number of items for
facts/quotesmodes. - DEFAULT_
MAX_ TOKENS - Default token budget for returned content.
Functions§
- read_
url - Fetch and distill a URL into citation-backed context.