Skip to main content
Glama

Keyword Metrics

sonar_keyword_metrics
Read-onlyIdempotent

Difficulty + popularity for a specific keyword (or up to 25 in bulk). Use this when you already know which keywords you care about — costs 1 credit per keyword. Works without an API key for up to 5 keywords/day (free tier, per IP); an API key removes that cap. Use sonar_keyword_search instead when you want related keyword ideas alongside metrics. Answers within about 30 seconds: a keyword that can't be computed in that time comes back as pending (queued on Sonar's scrape fleet, not charged, results are being cached) — call again after retry_after_seconds for just those keywords. Each row carries measured_at (when difficulty was measured) and popularity_measured_at (when the popularity value was measured — can be older), both ISO 8601 UTC. stale: false means both are under 7 days old; stale: true rows are real but older data (refreshed in the background) — check the timestamps when freshness matters.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
storeYesApp store. "ios" for Apple App Store, "android" for Google Play.
countryNoOne of Sonar's 72 keyword-research markets, as an ISO 3166-1 alpha-2 code (e.g. "us", "gb", "de", "jp", "br"). Keyword data isn't available for other storefronts. Default "us".us
keywordNoSingle keyword to fetch metrics for. Use this OR `keywords`, not both.
keywordsNoBulk list of keywords to fetch metrics for (max 25). Use this OR `keyword`, not both. 1 credit per keyword.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / country / description
      Previous value: -"ISO 3166-1 alpha-2 country code (e.g. \"us\", \"gb\", \"de\"). Default \"us\"."New value: +"One of Sonar's 72 keyword-research markets, as an ISO 3166-1 alpha-2 code (e.g. \"us\", \"gb\", \"de\", \"jp\", \"br\"). Keyword data isn't available for other storefronts. Default \"us\"."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, open-world), yet the description adds real operational context beyond them: per-keyword credit billing, the unauthenticated rate cap, a ~30s compute deadline with a `pending` status that is explicitly not charged, and a retry_after_seconds recovery loop. It further discloses freshness semantics (measured_at vs popularity_measured_at, 7-day `stale` threshold), which is exactly the kind of behavior annotations cannot express.

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 the sibling alternative are front-loaded in the first two sentences, and the remaining content is dense, non-redundant operational detail. It runs long and the pending-state sentence carries a slightly overloaded parenthetical ("queued on Sonar's scrape fleet, not charged, results are being cached"), but no sentence is filler.

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 read-only tool with no output schema, the description compensates by naming the returned fields (measured_at, popularity_measured_at, stale), explaining their semantics and the pending/retry_after_seconds shape. Combined with the billing, auth, and rate-limit coverage, an agent has everything needed to call it correctly and interpret the response.

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 description coverage is 100%, so the schema already documents store/country/keyword/keywords, including the keyword-vs-keywords mutual exclusion; that establishes a baseline of 3. The description still adds meaning the schema does not: cost scales linearly at 1 credit per element of `keywords`, and the free-tier cap effectively bounds bulk use to 5 keywords/day without auth.

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 first clause states the exact resource and outputs ("Difficulty + popularity for a specific keyword") plus its bulk scope (up to 25), which is a precise verb+resource statement. It explicitly names the sibling it is not (sonar_keyword_search) and states the condition that separates them, so an agent can route correctly without opening either 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?

Explicit when-to-use ("when you already know which keywords you care about") and an explicit alternative with its selecting condition ("Use sonar_keyword_search instead when you want related keyword ideas"). It also states cost (1 credit/keyword), auth prerequisites (works keyless to 5/day per IP; API key removes the cap), and the padding/retry path via retry_after_seconds — nothing material is left to inference.

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.