Skip to main content
Glama

Search within a page

search_page
Read-only

Fetch a webpage and return only the passages most relevant to a query using BM25 ranking; use it to search long pages or answer questions grounded in page content.

Instructions

Fetch a webpage and return only the passages most relevant to a query (BM25 ranked). Use this for long pages or to answer a specific question grounded in the page.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>",
      "query": "<query>"
    },
    "name": "search_page"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe page URL, including http:// or https://
queryYesWhat to look for on the page.
top_kNoHow many passages to return (default 5).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety and network-access profile is covered structurally. The description adds that output is filtered to top-ranked passages rather than the full document, which is genuinely useful. It says nothing about failure modes (JS-rendered pages, paywalls, timeouts) or whether a passage includes surrounding context.

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

Conciseness5/5

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

Two sentences, zero filler, with the core behavior front-loaded and the usage guidance second. Every clause earns its place.

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?

For a low-complexity, three-parameter read tool with full schema coverage and annotations, the definition covers purpose and selection criteria adequately. The remaining gap is the shape of the returned passages (plain text, scoring, citation), which matters slightly more because there is no output schema.

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 description coverage is 100%, including the default of 5 for top_k, so the schema carries the parameter burden. The description only adds the ranking notion ('BM25 ranked') that gives 'query' its meaning; it adds no format or constraint detail beyond the schema.

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

Purpose4/5

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

States a concrete pipeline: fetch a webpage, return only the passages most relevant to a query, ranked by BM25. That distinguishes it from the sibling fetch_page (which presumably returns the whole page), although the sibling is never named. The verb+resource+mechanism are all specific.

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

Usage Guidelines4/5

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

Explicitly gives the selecting conditions: 'long pages' or 'a specific question grounded in the page.' No when-not condition is stated and no alternative tool is named, so an agent must infer that fetch_page is the right choice when the entire page is needed.

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

Deploy Server

Other Tools