Skip to main content
Glama

analyze_serp

Read-onlyIdempotent

Analyze a keyword’s search engine results page to uncover ranking pages, SERP features, featured snippets, People Also Ask questions, and estimated search intent for SEO planning.

Instructions

Analyze the search engine results page (SERP) for a keyword. Returns organic results with position, URL, title, and description; detected SERP features (featured snippet, PAA, local pack, etc.); featured snippet content; People Also Ask questions; and estimated search intent. Requires DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD.

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": {
      "keyword": "<keyword>"
    },
    "name": "analyze_serp"
  }
}

Input Schema

NameRequiredDescriptionDefault
depthNoNumber of SERP results to return (10, 20, 50, or 100). Defaults to 10.
deviceNoDevice type for the SERP query. Defaults to "desktop".desktop
keywordYesThe search query to analyze.
locationNoLocation name for localized SERP (e.g. "United States"). Defaults to "United States".United States

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so safety and idempotency are covered. The description adds meaningful behavior beyond that: the exact result components returned and the hard dependency on DATAFORSEO_LOGIN/DATAFORSEO_PASSWORD environment variables, which an agent would otherwise only discover at call time.

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?

Purpose and return contents are front-loaded in one dense sentence, followed by a one-line credential requirement — no filler. The return list is long but earns its place because no output schema exists to carry that information.

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?

With no output schema, the description must describe return values and does so thoroughly, and it discloses the required credentials for an open-world, billed third-party API. It stops short of cost/credit implications per call or failure behavior (invalid keyword, quota exhaustion), which would matter for a paid SERP fetch.

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%, with depth, device, keyword, and location each documented including defaults and the allowed depth values. The description adds no parameter-level meaning beyond the schema, 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?

The description opens with a specific verb and resource: 'Analyze the search engine results page (SERP) for a keyword,' and then enumerates exactly what comes back (organic results, SERP features, featured snippet, PAA, intent). That return inventory implicitly separates it from keyword-research or page-analysis siblings, but no alternative is named explicitly, keeping it at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the purpose statement — an agent can infer 'call this when you need current SERP composition for a query.' There is no explicit when-to-use versus when-not guidance and no pointer to a sibling such as research_keywords for broader keyword ideation, so the agent must reason about the boundary itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.