Skip to main content
Glama

SEO and Keyword Data API

Keyword gap: competitor-only keywords (up to 100)

keyword_gap
Read-onlyIdempotent

Keyword gap: the Google keywords a competitor ranks for and your domain does not, each with the competitor's position, URL and estimated traffic plus search volume, CPC, difficulty and intent; up to 100 in one $0.048 call. Use when you need content gaps and keyword opportunities (bare domains; www. is dropped). No gap returns empty results (still charged). Bad input is free; upstream errors are not charged. Price: $0.048 per successful call, paid over x402 (USDC on Base); pass the payment in _meta["x402/payment"].

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": {
      "domain": "<domain>",
      "competitor": "<competitor>"
    },
    "name": "keyword_gap"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum gap keywords to return (1-200; above 100 is lowered to 100 with a warning). Defaults to 20.
domainYesYour domain, e.g. example.com (no scheme or path; a leading www. is dropped).
countryNoOptional ISO 3166-1 alpha-2 code or country name, used when locationCode is absent (uk = gb).
competitorYesThe competitor domain to compare against, e.g. example.org.
languageCodeNoLanguage code (2-letter). Defaults to en. An unsupported location falls back to 2840 (United States) with en (or the requested language if the United States offers it); a supported location with a language it does not offer uses that location's default language (en if offered). Either way market.fallback is true and market.warnings says what was used.
locationCodeNoGoogle Ads location code (geo target ID). Defaults to 2840 (United States); an unsupported code falls back to 2840 (United States, market.fallback).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses that an empty gap still incurs a charge, that bad input is free while upstream errors are not, the exact $0.048 price, and that payment must be passed via _meta["x402/payment"] on Base/USDC. Those are exactly the billing and auth facts an agent needs before committing to a paid 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?

Purpose and cost are front-loaded in the opening clause, and the pricing/billing caveats follow logically. It is somewhat dense as a single run-on sentence and repeats the price ($0.048 appears in both the first clause and the 'Price:' clause), costing a point.

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 6 parameters, no output schema, and a live external dependency, the description compensates by enumerating the returned fields (position, URL, traffic, search volume, CPC, difficulty, intent) and spelling out payment, empty-result, and error-charging behavior. Nothing an agent needs to call it correctly is missing.

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 coverage is 100%, so all six parameters including limit, country, locationCode and languageCode fallback behavior are already documented in structured fields. The description only restates the domain-normalization rule ('bare domains; www. is dropped') and the 100-item cap, adding marginal 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.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'the Google keywords a competitor ranks for and your domain does not', plus the per-keyword fields returned. This cleanly separates it from siblings like ranked_keywords (one domain), keyword_overview (no competitor diff), and page_intersection (page-level, not domain-level).

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?

'Use when you need content gaps and keyword opportunities' gives clear usage context and the domain-vs-domain framing implies when to reach for it. It stops short of naming an alternative tool (e.g. page_intersection or ranked_keywords) or an explicit when-not-to-use case, so it lands at 4 rather than 5.

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.