Skip to main content
Glama

Web search

web_search
Read-only

Search the web and get Google's top results as clean JSON: title, URL, snippet and date for each, plus the direct answer when Google shows one. Optional filters: freshness (past hour, day, week, month or year), include_domains or exclude_domains (up to 5 sites each), and type "news" for news articles with publisher and date. Up to 10 results. To get the pages' full text in the same call, use search_and_read.

$0.003 USDC per call over x402. Failed calls cost nothing. Call without payment to get a quote.

When to use: You need sources or facts and don't have URLs yet; the snippets often answer it on their own. Use instead: search_and_read when you also need the full text of the top pages in the same call; crypto_news for crypto coverage with a mood read. Parameters: query is required. num: 1-10 results, default 5. country: two-letter code for local results. freshness, include_domains and exclude_domains narrow the results and can combine; very narrow filters can return nothing (refused free). type "news" searches news articles only. Since Oct 30, 2026 Google returns results 4-10 as google.com/goto redirect links (marked link_type); send resolve: true to wait about 30 seconds for the real URLs. Returns: results[] with position, title, url, snippet and date (publisher for news), the answer box when Google shows one, and the filters applied.

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

Input Schema

NameRequiredDescriptionDefault
numNoHow many results, 1-10 (default 5).
typeNo"news" searches news articles instead of the whole web.
queryYesWhat to search for.
countryNoTwo-letter country code, e.g. "us".
paymentNoBase64 x402 payment payload. Omit it to receive a quote; sign that and call again.
resolveNoWait about 30 s so results 4-10 have real URLs instead of google.com/goto redirect links (default false).
freshnessNoOnly results from the past hour, day, week, month or year.
exclude_domainsNoNever results from these sites.
include_domainsNoOnly results from these sites, e.g. ["reuters.com"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / resolve
      Added value: +{
      +  "description": "Wait about 30 s so results 4-10 have real URLs instead of google.com/goto redirect links (default false).",
      +  "type": "boolean"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / num / description
      Added value: +"How many results, 1-10 (default 5)."
  3. Changed4 schema fields changed
    • addedInput schema / properties / exclude_domains
      Added value: +{
      +  "description": "Never results from these sites.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 5,
      +  "type": "array"
      +}
    • addedInput schema / properties / freshness
      Added value: +{
      +  "description": "Only results from the past hour, day, week, month or year.",
      +  "enum": [
      +    "hour",
      +    "day",
      +    "week",
      +    "month",
      +    "year"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / include_domains
      Added value: +{
      +  "description": "Only results from these sites, e.g. [\"reuters.com\"].",
      +  "items": {
      +    "type": "string"
      +  },
      +  "maxItems": 5,
      +  "type": "array"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "\"news\" searches news articles instead of the whole web.",
      +  "enum": [
      +    "web",
      +    "news"
      +  ],
      +  "type": "string"
      +}
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover readOnlyHint and openWorldHint; the description adds real operational context: per-call pricing ($0.003 USDC), that failed calls are free, that a call without `payment` returns a quote, that over-narrow filters can return nothing but are refused free, and the Oct 2026 google.com/goto redirect behavior with the ~30s `resolve` workaround. These are non-obvious behaviors an agent could not get from structured fields.

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 what the tool does and what it returns, then pricing, then routing guidance. A few sentences duplicate schema content (num range, country two-letter code, type 'news') and could be trimmed, but the density is high and each section serves a distinct purpose.

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?

There is no output schema, yet the description still documents the return payload (results[] with position/title/url/snippet/date, answer box, applied filters) plus pricing, auth/payment flow, and the link-resolution caveat. For a 9-parameter, paid, open-world search tool this covers everything needed to invoke it correctly.

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 already 100%, so the baseline is 3, but the description earns a bump by explaining cross-parameter interaction: freshness/include_domains/exclude_domains 'can combine' and narrow filters may return nothing, plus the meaningful consequence of `resolve`. It largely restates enum domains and defaults (num 1-10 default 5) that the schema already documents, which keeps it out of the top band.

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?

Opens with a specific verb and resource ('Search the web') and immediately states the return shape ('title, URL, snippet and date, plus the direct answer'). It explicitly distinguishes itself from siblings search_and_read and crypto_news, so an agent can route 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?

Has explicit 'When to use' (you need sources/facts and don't have URLs) and 'Use instead' clauses naming both alternatives with the conditions that select them. Nothing about tool selection is left to inference.

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.