Skip to main content
Glama

web_search_preview

Read-onlyIdempotent

Purpose: Perform web searches and return results in an LLM-friendly format and with parameters tuned for LLMs.

For multiple independent objectives, make one web_search_preview call per objective concurrently. Put related query variations for the same objective in a single call's search_queries list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectiveYesNatural-language description of what the web search is trying to find. Try to make the search objective atomic, looking for a specific piece of information. May include guidance about preferred sources or freshness.
search_queriesYesList of keyword search queries of 3-6 words, which may include search operators. The search queries should be related to the objective. Limited to 3 entries of 100 characters each.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
usageNoUsage metrics for the search request.
resultsYesA list of WebSearchResult objects, ordered by decreasing relevance.
warningsNoWarnings for the search request, if any.
search_idYesSearch ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / UsageItem / properties / name / examples
      Previous value: -[
      -  "sku_search_additional_results",
      -  "sku_extract_excerpts"
      -]New value: +[
      +  "sku_search",
      +  "sku_extract_excerpts"
      +]
  2. Added
  3. Removed
  4. Changed2 schema fields changed
    • changedInput schema / title
      Previous value: -"web_search_previewArguments"New value: +"search_toolArguments"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "UsageItem": {
      +      "description": "Usage item for a single operation.",
      +      "properties": {
      +        "count": {
      +          "description": "Count of the SKU.",
      +          "examples": [
      +            1
      +          ],
      +          "title": "Count",
      +          "type": "integer"
      +        },
      +        "name": {
      +          "description": "Name of the SKU.",
      +          "examples": [
      +            "sku_search_additional_results",
      +            "sku_extract_excerpts"
      +          ],
      +          "title": "Name",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "count"
      +      ],
      +      "title": "UsageItem",
      +      "type": "object"
      +    },
      +    "Warning": {
      +      "description": "Human-readable message for a task.",
      +      "properties": {
      +        "detail": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": true,
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Optional detail supporting the warning.",
      +          "title": "Detail"
      +        },
      +        "message": {
      +          "description": "Human-readable message.",
      +          "title": "Message",
      +          "type": "string"
      +        },
      +        "type": {
      +          "description": "Type of warning. Note that adding new warning types is considered a backward-compatible change.",
      +          "enum": [
      +            "spec_validation_warning",
      +            "input_validation_warning",
      +            "warning"
      +          ],
      +          "examples": [
      +            "spec_validation_warning",
      +            "input_validation_warning"
      +          ],
      +          "title": "Type",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "message"
      +      ],
      +      "title": "Warning",
      +      "type": "object"
      +    },
      +    "WebSearchResult": {
      +      "description": "A single search result from the web search API.",
      +      "properties": {
      +        "excerpts": {
      +          "anyOf": [
      +            {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Relevant excerpted content from the URL, formatted as markdown.",
      +          "title": "Excerpts"
      +        },
      +        "publish_date": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Publish date of the webpage in YYYY-MM-DD format, if available.",
      +          "title": "Publish Date"
      +        },
      +        "title": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ],
      +          "default": null,
      +          "description": "Title of the webpage, if available.",
      +          "title": "Title"
      +        },
      +        "url": {
      +          "description": "URL associated with the search result.",
      +          "title": "Url",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "url"
      +      ],
      +      "title": "WebSearchResult",
      +      "type": "object"
      +    }
      +  },
      +  "description": "Output for the Search API.",
      +  "properties": {
      +    "results": {
      +      "description": "A list of WebSearchResult objects, ordered by decreasing relevance.",
      +      "items": {
      +        "$ref": "#/$defs/WebSearchResult"
      +      },
      +      "title": "Results",
      +      "type": "array"
      +    },
      +    "search_id": {
      +      "description": "Search ID. Example: `search_cad0a6d2dec046bd95ae900527d880e7`",
      +      "title": "Search Id",
      +      "type": "string"
      +    },
      +    "usage": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/UsageItem"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Usage metrics for the search request.",
      +      "title": "Usage"
      +    },
      +    "warnings": {
      +      "anyOf": [
      +        {
      +          "items": {
      +            "$ref": "#/$defs/Warning"
      +          },
      +          "type": "array"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "default": null,
      +      "description": "Warnings for the search request, if any.",
      +      "title": "Warnings"
      +    }
      +  },
      +  "required": [
      +    "search_id",
      +    "results"
      +  ],
      +  "title": "SearchResponse",
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / search_queries / description
      Previous value: -"(optional) List of keyword search queries of 1-6\n words, which may include search operators. The search queries should be related to the\n objective. Limited to 5 entries of 200 characters each."New value: +"List of keyword search queries of 3-6\n words, which may include search operators. The search queries should be related to the\n objective. Limited to 3 entries of 100 characters each."
  6. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnly, openWorld, idempotent, and non-destructive, so the safety profile is covered. The description adds the concurrency/batching behavior, which is genuinely useful, but says nothing about rate limits, freshness handling, or result quality constraints. With annotations carrying the safety load, a 3 is appropriate.

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 purpose, then a short batching rule in two sentences. Every sentence carries information, though the second sentence spans two lines for one idea and could be tightened.

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?

An output schema exists, so return values need no explanation, and the schema documents both parameters fully. The description supplies the non-obvious batching strategy an agent needs to use the tool efficiently; only the sibling relationship to web_fetch is left implicit.

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

Parameters3/5

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

Schema description coverage is 100%, so both parameters (objective, search_queries) are fully documented in the schema, including the 3-entry/100-char limit and the 3-6 word query guidance. The description adds no parameter meaning beyond what the schema already provides, so the baseline 3 applies.

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 specific verb (Perform web searches) and resource (web), plus the differentiator that results are returned in an LLM-friendly format with LLM-tuned parameters. It does not explicitly name the sibling web_fetch or contrast the two, so it stops short of 5.

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 concrete operational guidance: one call per independent objective, run them concurrently, and group related query variations for the same objective into a single call's search_queries list. Clear context for batching, but no guidance on when to prefer web_fetch over this tool.

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