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. popularity (5-100) is the value Sonar's dashboard shows: Apple's Search Popularity when Apple has a real reading; when Apple reports a keyword below its threshold (popularity_apple 5, about 20) it is Sonar's estimate (at most 18). popularity_source says which (apple | proxy), popularity_apple is Apple's own reading (null on Android), popularity_proxy is Sonar's estimate beside a floored reading.

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": {
      "store": "<store>"
    },
    "name": "sonar_keyword_metrics"
  }
}

Input 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.6/5.0
Behavior5/5

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

Annotations carry the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial context beyond them: 1 credit per keyword, a 5/day free tier per IP removed by an API key, a ~30 second budget with `pending`/`retry_after_seconds` retry semantics for unfinished keywords, and what `stale`/`measured_at` mean. This is exactly the behavioral disclosure the annotations cannot provide.

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 core purpose, cost, and free-tier limits are front-loaded, and the density is justified because there is no output schema and the return-field semantics must live somewhere. It is a single long run-on paragraph, though, and the popularity_source/popularity_apple/popularity_proxy clause could be tightened.

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 no output schema, the description takes on the return-value burden and does so thoroughly: freshness timestamps, stale flag semantics, popularity range and source attribution. Combined with cost, rate limits, and lateness handling, an agent has everything needed to call it and interpret the result.

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 the schema already documents store, country, keyword vs keywords, and the max-25 limit; baseline is 3. The description reinforces the single-vs-bulk choice and the per-keyword credit cost but adds no new input-level semantics (the detailed field explanations concern outputs, not parameters).

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 description opens with a precise statement of what is returned (difficulty + popularity) for a specific resource (a keyword, or up to 25 in bulk), and explicitly distinguishes itself from sonar_keyword_search. An agent can tell exactly what this tool produces without opening any 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?

It states the selecting condition directly ('use this when you already know which keywords you care about') and names the alternative with its own selecting condition ('use sonar_keyword_search instead when you want related keyword ideas alongside metrics'). Both when-to-use and when-not-to-use are present.

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.