Skip to main content
Glama

web_search

Search a webpage for a specific term and get matching sections with context excerpts, so you can find needed information without loading the entire page.

Instructions

Search for a term within a webpage. Returns matching sections with context excerpts. Useful for finding specific info without loading the entire 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": "web_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesURL to search within
queryYesSearch term
render_jsNoRender JavaScript with Playwright

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it does disclose the return shape (matching sections with context excerpts), which is valuable. It says nothing about whether the fetch is read-only and safe, how many matches are returned, pagination, or failure behavior for unreachable/JS-heavy pages.

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?

Three short sentences, front-loaded with the action, then the return format, then the motivating use case. No filler or repetition.

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 simple three-parameter read tool with full schema coverage and no output schema, the description covers purpose, result shape, and use case adequately. The remaining gap is behavioral edge cases (limits, failures), which is minor for this complexity.

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

Parameters4/5

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

Schema description coverage is 100%, so url, query, and render_js are already documented, making the baseline 3. The description adds that the search is scoped to a single page's content and that results come back as sections, reinforcing what 'url' and 'query' mean in practice.

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 verb and resource ('Search for a term within a webpage') and scopes it to in-page matching rather than page retrieval. The clause 'without loading the entire page' implicitly separates it from page-level siblings like web_content, though no alternative is named explicitly.

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?

Gives a clear usage context — finding specific information in a page you don't want to load in full — which tells the agent when this is the right choice. It stops short of explicit exclusions or naming when another tool (e.g., web_outline or search_docs) is preferable.

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