Skip to main content
Glama

Web Search with Page Content

web_search

Searches the web for a query and returns agent-ready JSON: ranked results (position is Google's rank, display_rank the order shown) with the content of each result page. content controls what is read: none returns the result list only (no page fetched — the discovery step of a staged search); limit runs to 30, and above 10 the search fetches deeper Google pages; excerpt (default) returns a short clean excerpt of each page; full returns each page as Markdown (capped per result and by the whole-answer budget). Excerpts are made after boilerplate comes out (menus, link rails, repeated promos, furniture) and prefer the passages that answer the query, so page chrome cannot spend the excerpt budget; max_chars_per_result narrows the cap and max_total_bytes (default 65536) bounds the whole answer, cuts marked truncated and expandable (read that page whole with web_scrape). Discovery can be steered without another search: include_domains keeps only the listed sites (a domain covers its subdomains), exclude_domains drops its sites and wins over the allow list, and official_domains marks the sites you declare official (official_match, official_basis caller_declared — your declaration, never verified); prefer_official presents those first while position stays Google's rank (presentation and applied_filters say what was applied; filtering selects from the results already collected and never searches again to refill). prefer_domains selects results on those sites into the returned set first, positions unchanged; file_types keeps only results whose URL ends in one of the extensions (filtered_results counts the rest); published_after drops read results older than the date their page declares (stale_results counts them; undated pages are kept, and dropped pages were read and are charged); excluded_results counts results exclude_domains dropped. query_check and market_check say how the query and country were confirmed (executed_query and query_correction name a corrected query), and matched_terms names the executed query's terms found in each title or snippet. Each result states its evidence: evidence_status fetched_page (the page itself was read), snippet_only (only Google's snippet backs it — not verified page text) or no_evidence; content_status says what a read found: read (its main content), no_content (no readable text), no_main_content (only navigation or page furniture), needs_javascript (main content may need JavaScript or may be unavailable), image_only (images but no text), access_gate (a consent, sign-in or challenge screen), not_selected, no_url or failed; a page that fails to fetch is failed with a reason and HTTP status, fetched exactly once and never retried silently, and names a suggested_alternative from the same results page. Dates are kept apart: serp_collected_at (requested_at) is when Google was asked, page_retrieved_at when a result page was fetched, and published_at/updated_at only what the page itself declares (with their sources; absent stays unknown). timing splits the measured serp_ms, page_read_wall_ms, page_fetch_sum_ms and page_extract_sum_ms (the sums exceed the wall time when reads overlapped). The synchronous answer is whole when it returns; for result-first work call content none or a small max_pages_to_read, choose, then read the chosen pages with web_scrape (or run the search in the background with background true, and poll it with scraper_run_get). Result pages are read as static HTML without running scripts, so an access gate or script-only page stays access_gate, failed, needs_javascript or no_content rather than being retried or bypassed; the rendered comparison, where the service enables it, is html_metadata_extractor with render. Snippets are Google's own text as collected at serp_collected_at, so a relative age inside one ("7 hours ago") is Google's wording anchored at that collection moment, never a verified publication or release date. The results page itself follows the shared cache controls: freshness standard may answer from a stored page inside its window (0 credits, serp_cache_hit and the collection time state it; a cache answer is never guaranteed), max_age_seconds narrows the oldest stored page that may answer, and freshness fresh always fetches live; result pages are always fetched for this call. It composes google_serp_scrape and web_scrape's direct read server-side and is offered when the account holds both; each remains usable on its own. Credits: the Google results pages fetched (5 live, 0 from cache, per page) plus 1 per result page whose main content was read (content_status read; each result's credits states its own), at most max_pages_to_read of them; pages that fail or hold no main content are free, content none costs only the results pages, and cost_estimate states both maxima before execution (estimate_only returns them without running or charging anything). A read credit pays for fetching the page even when max_total_bytes afterwards cuts its body in this answer — possibly to empty — and such a result keeps content_status read with truncated and expandable set so the cut is visible, never silent. Documentation-looking URLs carry documentation_version_hint: literal version or rolling URL labels, their source and unknown where no label is found. With documentation_version it compares the label to the requested release, but URL labels may name an API or another component and never establish compatibility. No extra search or page read is made. The result is returned here and may also be kept for up to 30 days as a completed run: retained.run_id reads it again for free with scraper_run_get (retained.available false says why it was not kept). Saved synchronous results can be evicted earlier when storage is needed; set background true (with an idempotency_key) to start the work as a saved run at once. If the call would outlast the connection (many items, deep or fresh SERPs) or the platform has no free capacity, it is not failed: the result is an accepted answer (accepted true, run_id, state, next_step) and the work runs as a saved run; ask scraper_run_get about run_id (view status) as often as retry_after_seconds says. A batch tool's run is charged item by item as each item finishes (failed items are free); any other run once, when it completes. The same idempotency_key prevents a second charge during its retry window; a later new call may be charged.

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

Input Schema

NameRequiredDescriptionDefault
limitNoResults to return (1-30; above 10 the search fetches deeper Google pages at the usual per-page price)
queryYesSearch query. Non-blank text, maximum 200 UTF-8 bytes.
contentNoPage content per result: none (results only, no page fetched: the discovery step), excerpt (short clean excerpt, default), full (Markdown capped per result)excerpt
countryYesTwo-letter country code of a supported market; see GET /api/v1/serp/markets.
languageNoResult language (Google hl). Defaults to the market's own language; markets served through the managed SERP API accept any language code, e.g. en for English results in DE.
freshnessNoReuse of stored Google results pages. standard (default): a page fetched within this tool's window (24 hours; 6 hours with project_id unless max_age_seconds says otherwise) may answer, at 0 credits instead of 5. fresh: every page is fetched live now. A result says what it used at its top level: cache_hit, with cache_age_seconds (one search) or rows_from_cache and oldest_page_age_seconds (several searches).
verbosityNoconcise: short summary of the answer; full: the whole answer. Only shapes the output. Send idempotency_key to read the other form later without a new charge.
backgroundNoOptional. true starts this work as a saved background run and answers at once with run_id instead of the result; read it with scraper_run_get. Needs an idempotency_key: the same key returns the same run and never charges twice, for the 30 days the run is kept. Charged like the direct call, as the run's work completes. Without it, a call that would take too long is also answered as a saved run.
file_typesNoKeep only results whose URL path ends in one of these extensions (bare extensions such as xml, gz, json, pdf), for finding data endpoints rather than articles. filtered_results counts what it dropped.
estimate_onlyNoValidate and price the search without running it: no Google page, no page read, no charge. The answer is the request with empty results, estimate_only true and cost_estimate holding the maximum the real call can cost.
prefer_domainsNoSites (read like include_domains) selected into the returned set first, in rank order, so a source ranked below the limit cut is still returned and read. Positions stay Google's; an excluded or filtered result is never brought back. At most 20.
exclude_domainsNoOptional deny list of sites, read like include_domains. An excluded site wins over an included one. At most 20.
idempotency_keyNoOptional retry key bound to this customer and these arguments. Matching retries replay the first result and do not reserve a second credit; the replay says so in billing (replayed true, credits_charged_this_call 0, original_credits_used).
include_domainsNoOptional allow list of sites (canonical domains, e.g. example.com or docs.example.com; a listed domain also covers its subdomains, a leading www. names the site, ports and http(s) URLs are reduced to the host, international names are read as punycode). When set, only results on these sites are returned. At most 20.
max_age_secondsNoOldest stored results page that may answer, in seconds (60 to 86400); older pages are fetched live. Default: this tool's window (24 hours), or 6 hours (21600) when project_id is given and max_age_seconds is not, because a day-old page is not where a site ranks now.
max_total_bytesNoByte budget for the whole search result object (metadata, snippets and page content; the transport envelope around it is not counted). Page content alone is cut to fit; response_truncated, the exact response_bytes and each cut result's truncated/expandable say so, and a budget too small for the metadata alone fails the call uncharged instead of truncating identity fields. Read a cut page whole with web_scrape.
prefer_officialNoPresent results on official_domains first (Google's order kept inside each group; position stays Google's rank, display_rank the order shown, presentation says what happened). Without official_domains nothing is preferred and nothing is labelled official. Never runs another search.
published_afterNoYYYY-MM-DD: drop fetched results whose page-declared date (published, else updated) is older; undated pages are kept and the dropped ones counted in stale_results. Needs content excerpt or full; dropped pages were read and are charged as reads.
official_domainsNoSites you treat as official for this query (read like include_domains). Matching results carry official_match with official_basis caller_declared: your declaration, never a verified status. Filters nothing by itself; combine with include_domains to keep only them, or prefer_official to show them first. At most 20.
max_pages_to_readNoCap on result pages fetched, in presentation order (0 fetches none). Omitted reads up to limit pages. Unread fetchable results are not_selected and rest on their snippet (evidence_status snippet_only): read one later with web_scrape instead of paying for every result up front.
max_chars_per_resultNoNarrow the per-result content cap, in characters: excerpts default to 1200, full Markdown to 32000.
documentation_versionNoOptional pinned numeric release such as 0.13.3. URL version labels are compared with it as hints, never as proof of compatibility. Also include the release in query to affect discovery; this field does not change the search or fetch extra pages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, destructiveHint=false and openWorldHint=true; the description adds the materially important behavior: credit pricing per fetched SERP page and per read page, cache-hit economics (0 vs 5 credits), no silent retries ('fetched exactly once and never retried silently'), truncation that can cut a paid read's body, and 30-day run retention with idempotent replay. It stays consistent with the annotations — it never claims a safe read-only no-side-effect operation, matching readOnlyHint=false through its charging and saved-run semantics.

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

Conciseness3/5

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

The critical output-and-content explanation is front-loaded, which is good, but the body is an undifferentiated block covering pricing, caching, date provenance, timing internals, documentation hints and retention with no grouping or structure. Several passages are near-restatements of schema text, and the reader must work hard to extract the decision-relevant lines.

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 22 parameters and no output schema, the description carries the full burden and does: it enumerates the return fields (evidence_status, content_status, official_match, serp_collected_at, cost_estimate, retained, accepted) and explains the accepted/background escape hatch. An agent can predict the result shape and failure modes without an output schema.

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 schema already documents each of the 22 parameters and the baseline is 3. The description still adds cross-parameter meaning the schema does not: published_after 'Needs content excerpt or full; dropped pages were read and are charged', max_total_bytes cutting content yet the read credit still applying, and prefer_domains versus include_domains selection differences.

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 ('searches the web for a query') plus the output shape ('ranked results ... with the content of each result page'). It distinguishes itself from siblings explicitly, naming web_scrape for reading pages, google_serp_scrape for results-only, and html_metadata_extractor with render for rendered comparison.

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 staged workflow: 'for result-first work call content none or a small max_pages_to_read, choose, then read the chosen pages with web_scrape (or run the search in the background with background true, and poll it with scraper_run_get).' It also states exclusions and boundaries for alternatives (e.g. pages that stay access_gate or needs_javascript are 'never retried or bypassed', and estimate_only is for pricing without running).

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