Skip to main content
Glama

Search the web

search_web

Search the web for a query and return the ranked results, each with its title, url and snippet: organic web results, no ads or AI summaries. Use it to find pages whose URLs you do not know. It searches the web, unlike list_pages with q, which searches inside a project's stored run. For URLs you already have use scrape_urls; scrape_urls with full=true reads one result in full. Inputs: query as typed into a search engine, e.g. 'python http client'. source='news' searches news results instead of the web's, for recent coverage of a company, person or event: each result also says who published it (publisher) and how old it is (age, e.g. '20h'). scrape=true also fetches each result's page as markdown in the same call. include_domains=['python.org'] keeps the search to those sites; exclude_domains drops sites, and an exclude wins. Cost: 8 credits a search, whatever read it. A search with no results to be had is free. An equal search (same query, source, country, lang, freshness and domains) within an hour of a finished one, or ten minutes for news, comes from cache with no charge for the results page. Scraped pages are charged, cached or not. Timing: it waits for the results. A search aims to answer within about 35 seconds and can take longer. If a search outlasts the connection's time limit, a job comes back for get_job; a scraping search whose pages are still landing returns its results with a job for the pages. A dropped connection is retried without searching twice, and when the first request is still being answered past the wait, a job comes back for get_job as well. Needs write access; a read-only connection is refused with code 'read_only'.

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": "search_web"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoA language code for the results, e.g. 'en'; omit for the default.
limitNoHow many results to return, 1 to 10 (default 10).
queryYesWhat to search the web for, 1 to 400 characters, as it would be typed into a search engine.
scrapeNotrue also fetches each result's page as markdown; each page costs credits. false (default) returns the results only.
sourceNo'web' (default) searches the web's results; 'news' news results, each with its publisher and age.web
countryNoA 2-letter country code to search from, e.g. 'us' or 'de'; omit for the default.
freshnessNoOnly results from the last hour, day, week, month or year; omit for any time.
exclude_domainsNoUp to 20 sites to leave out of the results, e.g. ['pinterest.com']; an exclude wins over an include.
include_domainsNoUp to 20 sites to search within, e.g. ['python.org']; omit for the whole web.

Output Schema

NameRequiredDescriptionDefault
idNoThe search's id: for get_job with kind 'search'.
jobNoWhile it is still going: {kind: 'search', id} for get_job. A scraping search can carry its results and a job for the pages still landing.
codeNoOnly on a failure: a machine-readable reason, e.g. read_only, validation, plan_limit or not_found.
noteNoThe cache rule, and what to do next when it is still going; with status 'running' and no `job`, that the search runs once and where its results are kept.
errorNoOnly when the call failed: what went wrong, in words an assistant can act on.
queryNoThe query as searched.
cachedNotrue when an equal search within the hour (ten minutes for news) answered it, with no charge for the results page.
detailNoOnly on a failure: the API's own wording, when the error was rephrased.
noticeNoOnly when a limit, not the site, held pages back: one line saying what they needed and why (the plan, the stealth trial or the credits left). Tell the person; it comes first in the answer.
statusNo'done'; 'blocked' when it has no results (see `outcome`); 'running' with a `job` while it goes on (with only a `note` in the rare case a search whose answer was lost could not be found). On an error, the HTTP status code.
noticesNoWith `notice`: one per reason, {reason, pages, needs, examples, unlockedBy, upgradeUrl}, and `outlook` {tier, likely, why} on a page's; unlockedBy is the plan that reads them, null for credits or a cap the workspace set itself.
outcomeNoWith status 'blocked': 'no_results' when no results could be read for the query (nothing charged); null when the search did not run because the credits left could not pay for it -- tell the person, as a top-up or a plan change fixes it.
resultsNoUp to 10, as ranked, each {position, title, url, snippet, source}; a news result also {publisher, age}, age as its source put it, e.g. '20h'; when scraped also `page`, {url, title, words, status, links (a count), markdown excerpt}, the excerpts sharing 60,000 characters.
waitedMsNoWith status 'running': how long, in milliseconds, this call waited for the search before handing back its job.
creditsUsedNoCredits this search spent, scraped pages included.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / source / description
      Previous value: -"'web' (default) searches the web's results; 'news' the engines' news results, each with its publisher and age."New value: +"'web' (default) searches the web's results; 'news' news results, each with its publisher and age."
    • removedOutput schema / properties / attempts
      Removed value: -{
      -  "description": "Blocked only: each engine tried, and why it was refused.",
      -  "title": "Attempts"
      -}
    • removedOutput schema / properties / engine
      Removed value: -{
      -  "description": "The engine whose results page answered: 'google', 'duckduckgo' or 'bing'.",
      -  "title": "Engine"
      -}
    • changedOutput schema / properties / notices / description
      Previous value: -"With `notice`: one per reason, {reason, pages, needs, examples, unlockedBy, upgradeUrl}, `engine` on a search's and `outlook` {tier, likely, why} on a page's; unlockedBy is the plan that reads them, null for credits or a cap the workspace set itself."New value: +"With `notice`: one per reason, {reason, pages, needs, examples, unlockedBy, upgradeUrl}, and `outlook` {tier, likely, why} on a page's; unlockedBy is the plan that reads them, null for credits or a cap the workspace set itself."
    • changedOutput schema / properties / outcome / description
      Previous value: -"With status 'blocked': 'no_results' when every engine refused the results page or had nothing about the query (nothing charged); null when the search did not run because the credits left could not pay for a results page -- tell the person, as a top-up or a plan change fixes it."New value: +"With status 'blocked': 'no_results' when no results could be read for the query (nothing charged); null when the search did not run because the credits left could not pay for it -- tell the person, as a top-up or a plan change fixes it."
    • changedOutput schema / properties / results / description
      Previous value: -"Up to 10, as ranked, each {position, title, url, snippet, source, engine}; a news result also {publisher, age}, age as the engine put it, e.g. '20h'; when scraped also `page`, {url, title, words, status, links (a count), markdown excerpt}, the excerpts sharing 60,000 characters."New value: +"Up to 10, as ranked, each {position, title, url, snippet, source}; a news result also {publisher, age}, age as its source put it, e.g. '20h'; when scraped also `page`, {url, title, words, status, links (a count), markdown excerpt}, the excerpts sharing 60,000 characters."
    • changedOutput schema / properties / status / description
      Previous value: -"'done'; 'blocked' when no engine answered (see `outcome`); 'running' with a `job` while it goes on (with only a `note` in the rare case a search whose answer was lost could not be found). On an error, the HTTP status code."New value: +"'done'; 'blocked' when it has no results (see `outcome`); 'running' with a `job` while it goes on (with only a `note` in the rare case a search whose answer was lost could not be found). On an error, the HTTP status code."
  2. Changed5 schema fields changed
    • addedInput schema / properties / source
      Added value: +{
      +  "default": "web",
      +  "description": "'web' (default) searches the web's results; 'news' the engines' news results, each with its publisher and age.",
      +  "enum": [
      +    "web",
      +    "news"
      +  ],
      +  "title": "Source",
      +  "type": "string"
      +}
    • changedOutput schema / properties / cached / description
      Previous value: -"true when an equal search within the hour answered it, with no charge for the results page."New value: +"true when an equal search within the hour (ten minutes for news) answered it, with no charge for the results page."
    • changedOutput schema / properties / note / description
      Previous value: -"The cache rule, and what to do next when it is still going."New value: +"The cache rule, and what to do next when it is still going; with status 'running' and no `job`, that the search runs once and where its results are kept."
    • changedOutput schema / properties / results / description
      Previous value: -"Up to 10, as ranked, each {position, title, url, snippet, source, engine}; when scraped also `page`, {url, title, words, status, links (a count), markdown excerpt}, the excerpts sharing 60,000 characters."New value: +"Up to 10, as ranked, each {position, title, url, snippet, source, engine}; a news result also {publisher, age}, age as the engine put it, e.g. '20h'; when scraped also `page`, {url, title, words, status, links (a count), markdown excerpt}, the excerpts sharing 60,000 characters."
    • changedOutput schema / properties / status / description
      Previous value: -"'done'; 'blocked' when no engine answered (see `outcome`); 'running' with a `job` while it goes on. On an error, the HTTP status code."New value: +"'done'; 'blocked' when no engine answered (see `outcome`); 'running' with a `job` while it goes on (with only a `note` in the rare case a search whose answer was lost could not be found). On an error, the HTTP status code."
  3. Changed2 schema fields changed
    • addedInput schema / properties / limit / maximum
      Added value: +10
    • addedInput schema / properties / limit / minimum
      Added value: +1
  4. Changed2 schema fields changed
    • changedOutput schema / properties / engine / description
      Previous value: -"The engine whose results page answered, e.g. 'google' or 'bing'."New value: +"The engine whose results page answered: 'google', 'duckduckgo' or 'bing'."
    • changedOutput schema / properties / notices / description
      Previous value: -"With `notice`: one per reason, {reason, pages, needs, examples, unlockedBy, upgradeUrl}, and `engine` on a search's; unlockedBy is the plan that reads them, null for credits or a cap the workspace set itself."New value: +"With `notice`: one per reason, {reason, pages, needs, examples, unlockedBy, upgradeUrl}, `engine` on a search's and `outlook` {tier, likely, why} on a page's; unlockedBy is the plan that reads them, null for credits or a cap the workspace set itself."
  5. Changed3 schema fields changed
    • addedOutput schema / properties / outcome
      Added value: +{
      +  "description": "With status 'blocked': 'no_results' when every engine refused the results page or had nothing about the query (nothing charged); null when the search did not run because the credits left could not pay for a results page -- tell the person, as a top-up or a plan change fixes it.",
      +  "title": "Outcome"
      +}
    • changedOutput schema / properties / status / description
      Previous value: -"'done'; 'no_results' when every engine refused the results page or had nothing about the query (nothing charged; an older API says 'blocked'); 'running' with a `job` while it goes on. On an error, the HTTP status code."New value: +"'done'; 'blocked' when no engine answered (see `outcome`); 'running' with a `job` while it goes on. On an error, the HTTP status code."
    • addedOutput schema / properties / waitedMs
      Added value: +{
      +  "description": "With status 'running': how long, in milliseconds, this call waited for the search before handing back its job.",
      +  "title": "Waitedms"
      +}
  6. Changed3 schema fields changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Only when a limit, not the site, held pages back: one line saying what they needed and why (the plan, the stealth trial or the credits left). Tell the person; it comes first in the answer.",
      +  "title": "Notice"
      +}
    • addedOutput schema / properties / notices
      Added value: +{
      +  "description": "With `notice`: one per reason, {reason, pages, needs, examples, unlockedBy, upgradeUrl}, and `engine` on a search's; unlockedBy is the plan that reads them, null for credits or a cap the workspace set itself.",
      +  "title": "Notices"
      +}
    • changedOutput schema / properties / status / description
      Previous value: -"'done'; 'blocked' when every engine refused the results page (nothing charged); 'running' with a `job` while it goes on. On an error, the HTTP status code."New value: +"'done'; 'no_results' when every engine refused the results page or had nothing about the query (nothing charged; an older API says 'blocked'); 'running' with a `job` while it goes on. On an error, the HTTP status code."
  7. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only mark it non-read-only, open-world, non-idempotent and non-destructive; the description goes well past that with a credit price (8 credits), a free-no-results rule, cache windows (one hour, ten minutes for news), and the fact that cached scrapes are still billed. It also discloses write-access requirements and the 'read_only' error code, plus timeout-to-job handoff via get_job and retry-without-double-search behavior. The only slack is that idempotency implications of the cache are not spelled out.

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?

Well organized into purpose, differentiation, inputs, cost and timing, with the most decision-relevant routing facts front-loaded. The timing paragraph is the longest and carries some retry minutiae an agent rarely acts on, but nothing is redundant or empty.

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?

For a 9-parameter networked search with an output schema, the description covers cost, caching, auth requirements, failure modes and job fallbacks — everything needed to call it and interpret a non-result response. Return-field structure is left to the output schema, which is the right division of labor.

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 real semantics beyond it: query is 'as typed into a search engine' with an example, source='news' yields publisher and age fields, scrape=true adds a per-page charge, and 'an exclude wins' over an include. It does not cover lang, country, freshness or limit, though the schema documents those adequately.

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 (search) and resource (the web), then enumerates exactly what comes back: ranked results with title, url and snippet, organic only, no ads or AI summaries. It explicitly contrasts itself with list_pages and scrape_urls, so the agent can place it without opening a sibling 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 names the selection condition ('pages whose URLs you do not know'), the alternative for known URLs (scrape_urls), and the sibling that searches stored runs (list_pages with q). It also gives a within-tool routing rule: source='news' for recent coverage of a company, person or event.

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.