Skip to main content
Glama

Get keyword rankings

get_keyword_rankings
Read-onlyIdempotent

Rank-tracking view from Google Search Console, covering the website's tracked keywords only and refreshed at the Search Console sync cadence (see gsc_last_synced_at): for each keyword the current average position, the page ranking for it, clicks, impressions, ctr (clicks / impressions), the country of that snapshot and the last sync time. Pass keyword_ids (max 50) or get the top N keywords (default 50, max 50). Filters run in the database: position_min and position_max bound the current position (unranked keywords are excluded when either is set), min_impressions drops low-visibility keywords, and sort orders by position (best first, unranked last, default), impressions or clicks (highest first). Page-2 quick wins: position_min 5, position_max 15, min_impressions 200, sort impressions. position_30d_ago is included when a history point exists around 30 days ago for the snapshot country (or the country you pass, lowercase alpha-3 like usa, or wwd). Not for changes over time: use get_keyword_trends for click, impression and position deltas between periods. Tells you when Google Search Console is not connected instead of returning empty positions silently. Pass website_id when the account has several websites (see get_account).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoHow many keywords to return when keyword_ids is omitted.
sortNoposition: best first, unranked last; impressions or clicks: highest first.position
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 report; omit to get the best-ranking ones.
position_maxNoOnly keywords whose current position is at most this value; must be >= position_min.
position_minNoOnly keywords whose current position is at least this value (1 = top of page 1).
min_impressionsNoOnly keywords with at least this many impressions in the current snapshot.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
localeYes
rankingsYes
gsc_statusYes
website_idYesWebsite the result belongs to.
gsc_fix_urlNoWhere to connect Search Console; only present when it is not connected.
gsc_connectedYesWhether Google Search Console is connected for the website.
gsc_last_synced_atYes

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 indicate read-only, idempotent, and non-destructive behavior, so the description's added value comes from extra context: data freshness follows the Search Console sync cadence with a reference to gsc_last_synced_at, unranked keywords are excluded when either position bound is set, the 30-day historical point is conditionally included, and the tool reports an unconnected GSC instead of returning empty positions. These are meaningful edge-case behaviors beyond the annotations and are not contradicted.

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 every sentence earns its place: it opens with purpose, defines the data fields, explains filters and sort semantics, gives a ready-to-use query, names the alternative tool, and closes with connection-status and website_id guidance. The structure flows logically from what the tool returns to how to shape a request, and the density is appropriate for an 8-parameter read-only tool.

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 complexity, the presence of an output schema (which covers return-value details), and read-only annotations, the description covers the remaining operational context: data freshness, server-side filtering, historical data availability, alternative use cases, error behavior when GSC is disconnected, and the multi-website case. An agent has everything needed to select and call it correctly without further lookups.

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 already covers 100% of parameters with descriptions, the description layers on significant additional semantics: the unranked-exclusion behavior when position_min or position_max is set, the explicit CTR formula, the interpretation of country defaults to snapshot country or a lowercase alpha-3 code, and the practical example showing how to combine filters and sort. This goes beyond simple parameter documentation and materially improves correct invocation.

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 clearly identifies the tool as a rank-tracking view from Google Search Console for the website's tracked keywords, stating exactly what is returned (current average position, page ranking, clicks, impressions, CTR, country, last sync time). It also differentiates from get_keyword_trends by explicitly stating it is not for changes over time, so an agent can correctly choose between 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?

It provides explicit when-to-use guidance: 'Not for changes over time: use get_keyword_trends for click, impression and position deltas between periods.' It also gives a concrete recipe for a common use case ('Page-2 quick wins: position_min 5, position_max 15, min_impressions 200, sort impressions') and explains when website_id is required, which is actionable and leaves little 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.