Skip to main content
Glama

Web search for agents: Google results as clean JSON (title, URL, date)

web_search
Read-onlyIdempotent

Use when an agent needs current web results for a query. Input: q, optional max (1-10, default 5), time_range (day, week, month, year). Output: JSON results with title, URL and date when known, provider and retrieval time. For page text use /v1/web/search-read. Provider failure is not charged. Use instead: web_search_read for the top pages' text too; web_answer for a sourced answer; news_brief for news on a topic. Example: ?q=x402+payment+protocol&max=5 Price: $0.006 per call, paid in USDC (Base, Monad, Polygon, Arbitrum or Solana) via x402.

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": {
      "q": "<q>"
    },
    "name": "web_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesSearch query
maxNoNumber of results (default 5)
time_rangeNoOnly results from the past day, week, month or year

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint and destructiveHint=false, yet the description adds real behavioral context beyond them: the JSON return shape (title, URL, date when known, provider and retrieval time), the 'provider failure is not charged' policy, and per-call pricing of $0.006 in USDC via x402 across five chains. It stops short of rate limits or result-quality caveats, so it is strong but not exhaustive.

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?

The definition is front-loaded: purpose, inputs, outputs, then alternatives, with pricing last. Nearly every clause carries information, though the list of five payment chains and the URL-encoded example are denser than an agent strictly needs to select and call the tool.

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

Completeness5/5

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

With no output schema, the description compensates by naming the return fields and noting dates appear 'when known'. Inputs, outputs, failure billing, alternatives and cost are all covered, so nothing an agent needs to call this correctly is missing.

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 coverage is 100%, so the baseline is 3, but the description adds genuinely new detail: 'max' bounds of 1-10 with a default of 5 (the schema only says 'default 5') and a concrete enumeration of time_range values (day, week, month, year) where the schema supplies no enum. The worked example also clarifies query formatting.

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?

The opening sentence states a specific verb and resource ('agent needs current web results for a query'), and the title adds the concrete output shape (Google results as clean JSON with title, URL, date). It explicitly names the sibling tools it is not (web_search_read, web_answer, news_brief), so an agent can differentiate without opening any schema.

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?

It gives an explicit triggering condition ('Use when an agent needs current web results') and routes alternatives with named siblings: web_search_read for page text, web_answer for a sourced answer, news_brief for news. It also points to /v1/web/search-read for page text, so the when/when-not boundary is fully drawn.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources