Skip to main content
Glama

SerpApi search

search
Read-only

Universal search tool supporting all SerpApi engines and result types.

When to use:
    - Any query needing live, structured SERP data: web results, news, product listings, job postings, local businesses, flight/hotel prices, video results, images, stock/weather cards, knowledge graph entities.

Engine discovery via MCP resources:
    - serpapi://engines lists all engines supported by this tool.
    - serpapi://engines/<engine> provides engine-specific parameters and supported options.
    - Example: serpapi://engines/google_news

Input schema:
    params: JSON object containing SerpApi engine parameters.
        Common parameters:
            - q: Search query. Required for most engines.
            - engine: SerpApi engine name. Defaults to "google_light".
            - location: Optional geographic location for localized results.
            - output: Optional response format. Omit for JSON (default), or set to "md" for Markdown.

        Engine-specific parameters are available via MCP resources:
            - serpapi://engines lists all supported engines.
            - serpapi://engines/<engine> provides parameters and options for one engine.

    mode: Response mode. Defaults to "complete".
        - "complete": Return the full SerpApi response.
        - "compact": Remove metadata fields from JSON responses. Markdown is returned unchanged.

Output schema:
    structuredContent.result contains the response string: serialized JSON or unchanged Markdown.
    The same string is included in text content. Tool failures preserve this wrapper and set isError to true.

Guided search:
    Searches can request missing engine parameters from supporting clients using the engine catalog and engine-specific rules.
    Flights collect airports and dates, and directions collect missing endpoints.
    Hotels require stay dates and either a destination query or a property_token from an earlier result.
    Other clients receive a missing-parameter error. Cancellation does not run a search.

Examples:
    Weather: {"params": {"q": "weather in London", "engine": "google"}, "mode": "complete"}
    Stock: {"params": {"q": "AAPL stock", "engine": "google"}, "mode": "complete"}
    General: {"params": {"q": "coffee shops", "engine": "google_light", "location": "Austin, TX"}, "mode": "complete"}
    Compact: {"params": {"q": "news"}, "mode": "compact"}
    Markdown: {"params": {"q": "news", "output": "md"}}

Supported engines include (not limited to):
    - google
    - google_light
    - google_flights
    - google_hotels
    - google_images
    - google_news
    - google_local
    - google_shopping
    - google_jobs
    - bing
    - yahoo
    - duckduckgo
    - youtube_search
    - baidu
    - ebay

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoResponse mode (default: "complete") - "complete": Returns the full response - "compact": Removes metadata fields from JSON responses; Markdown is unchangedcomplete
paramsNoDictionary of SerpApi engine-specific parameters. Common parameters include: - q: Search query (required for most engines) - engine: Search engine to use (default: "google_light") - location: Geographic location filter - output: Response format; omit for JSON or set to "md" for Markdown

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the supplied annotations, the description discloses default engine and mode values, the effect of compact mode on JSON versus Markdown, that failures preserve the wrapper and set isError to true, and that cancellation does not run a search. It also explains guided-parameter collection for flights, hotels, and directions, which materially changes how an agent should prepare a call.

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 and organized under clear headings, and each example earns its place by showing a distinct invocation shape. It is on the long side and repeats the MCP engine-resource pointers in both the 'Engine discovery' section and the 'Input schema' section, which is mildly wasteful.

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?

Given the tool's breadth, the description covers purpose, usage categories, defaults, response modes, error semantics, guided parameter collection, examples, and an engine catalog. With an output schema already documenting the return wrapper, there is little an agent would need to know about correct invocation that this description omits.

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?

The input schema already documents both parameters with full coverage, so the baseline is three; the description goes further by pointing to serpapi://engines and serpapi://engines/<engine> as the authoritative source for engine-specific parameters. It also clarifies that q is required for most engines and that output=md switches to Markdown, adding useful operational meaning beyond the schema text.

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?

The opening sentence names a specific verb (search) and resource scope (all SerpApi engines and result types), making the tool's function unmistakable. It does not explicitly name or contrast the sibling tools search_dashboard, search_table, or extract, but the emphasis on live, structured SERP data implicitly separates it from those.

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?

A dedicated 'When to use' section enumerates concrete query categories such as web results, news, product listings, and flight/hotel prices, giving clear context for invocation. It stops short of naming alternative tools or stating when not to use this one, so the routing guidance is contextual rather than exclusionary.

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.