web_rag_context
Extract and rank the most relevant passages from a web page or text against a query, compressed to fit a context window.
Instructions
Retrieve the passages of a page most relevant to a query, compressed to fit a context window.
Splits the content into sentence-aligned passages, ranks them against query,
and returns the best ones together with a compressed context block. Use this
when a page is too long to hand to a model whole, or when you need to find the
specific passages that answer a question.
Provide either url (fetched first) or text (used directly). query is
required: this tool retrieves, it does not summarise.
Ranking is lexical (stop-word-filtered IDF over content terms), not embedding
based, so a query phrased with different vocabulary than the document will miss.
Use compressed_context as the text to pass to a model; chunks are for
inspection and citation.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "web_rag_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| text | No | ||
| query | No | ||
| top_k | No | ||
| max_chunk_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |