Skip to main content
Glama

Get keyword trends

get_keyword_trends
Read-onlyIdempotent

Google Search Console trend view for the website's tracked keywords, refreshed at the Search Console sync cadence: compares the last window_days (7, 28 or 90, default 28) with the window_days before it. Per keyword: clicks, impressions and impression-weighted average position in both windows plus the deltas (current minus previous), and the page currently ranking for it. by_page groups the clicks and impressions of every keyword with data by that page, most decayed first (clicks_delta ascending), so it answers which pages are losing traffic. Pass keyword_ids (max 200) or let it consider every keyword with history; rows are sorted by clicks_lost (default), clicks_gained, position_lost or position_gained and cut to top (default 50, max 200). by_page is computed before the cut. Rows use each keyword's snapshot country, or the country you pass (lowercase alpha-3 like usa, or wwd). Keywords without history in either window are omitted; a position is null when its window has no impressions. Search Console data lags 2 to 3 days, so the newest days of the current window are usually missing. Not for the current position or ctr (use get_keyword_rankings) nor volume and difficulty (use list_keywords). Tells you when Google Search Console is not connected instead of returning empty rows silently. Pass website_id when the account has several websites (see get_account).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoHow many rows to return after sorting.
sortNoclicks_lost: biggest click drop first; position_lost: biggest position increase (worse) first.clicks_lost
countryNoCountry of the Search Console rows to use, lowercase alpha-3 (usa, fra, ...) or wwd; defaults to each keyword's snapshot country.
website_idNoWebsite id from get_account. Optional when the account has a single website.
keyword_idsNoSpecific keywords to compare; omit to consider every keyword with Search Console history.
window_daysNoLength in days of each compared window: 7, 28 or 90.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortYes
localeYes
trendsYes
by_pageYesPer ranking page, most decayed first.
gsc_statusYes
website_idYesWebsite the result belongs to.
gsc_fix_urlNoWhere to connect Search Console; only present when it is not connected.
window_daysYes
gsc_connectedYesWhether Google Search Console is connected for the website.
current_windowYes
previous_windowYes
gsc_last_synced_atYes
keywords_with_dataYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds substantial behavioral context beyond that: it explains the 2–3 day data lag, that keywords without history are omitted, that position is null when a window has no impressions, that by_page is computed before the top cut, and that it surfaces a 'not connected' state instead of silently returning empty rows. This is exactly the kind of non-obvious behavior an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is long but information-dense, with every sentence contributing a distinct fact: comparison windows, metrics, grouping, sorting, defaults, country handling, data lag, exclusions, and error behavior. It is front-loaded with the core purpose before covering parameter behavior and use boundaries.

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 moderate complexity, the presence of an output schema, and rich annotations, the description covers all expected context: window semantics, defaults, exclusions, data freshness, edge cases for missing impressions, and alternative tools. An agent can select and invoke this tool correctly without additional documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although the schema has 100% parameter description coverage, the tool description adds operational meaning beyond the schema: sort options map to concrete meanings, default country behavior falls back to each keyword's snapshot country, by_page is applied before the top cut, and keyword_ids max 200 can be omitted to include all tracked keywords. These details are not inferable from the schema alone.

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 names a specific resource (Google Search Console keyword trends) and a precise operation: comparing the last window_days against the prior window_days with per-keyword metrics and deltas. It also explicitly contrasts itself with get_keyword_rankings and list_keywords, so it is clearly distinguishable from siblings.

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?

The description gives explicit when-to-use guidance ('answers which pages are losing traffic') and provides direct exclusions with named alternatives: 'Not for the current position or ctr (use get_keyword_rankings) nor volume and difficulty (use list_keywords).' It also clarifies the sync cadence and the Search Console connection failure behavior, leaving little ambiguity about when to invoke this tool.

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.