Skip to main content
Glama
webscout-mcp

webscout-mcp

by wxs-lang

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

NameRequiredDescriptionDefault
urlNo
textNo
queryNo
top_kNo
max_chunk_sizeNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.4.0

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses the ranking algorithm (stop-word-filtered IDF over content terms, not embeddings), the resulting failure mode (vocabulary mismatch misses), that url is fetched first, and which output field to consume versus inspect. Gaps remain around what happens when both url and text are supplied, error behavior on failed fetches, and any caching — hence not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core action and scoped tightly to four short paragraphs, each earning its place (mechanism, usage trigger, input contract, ranking caveat). The final sentence about chunks vs compressed_context could fold into the input contract line to tighten further.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values needn't be explained, and the description still helpfully directs the agent to compressed_context for model consumption. For a non-destructive read tool with no annotations, the only real shortfall is the undocumented tuning parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It successfully explains the url/text exclusivity and the meaning of query, but top_k and max_chunk_size — including the non-obvious unit of max_chunk_size (default 60, presumably words) — receive no explanation at all in either the description or the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource — 'Retrieve the passages of a page most relevant to a query, compressed to fit a context window' — and the second sentence spells out the mechanism (sentence-aligned passages, ranked against query). This is clearly distinct from fetch/extract siblings, which return whole pages rather than ranked passages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit triggers: '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.' It also states the inverse boundary — 'this tool retrieves, it does not summarise' — which tells the agent when this tool is the wrong choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.