Skip to main content
Glama

Yandex Metrika MCP

query

Run a Reporting API query against a Metrika counter (aggregated stats).

Pass Metrika field names directly. Common ones:

Metrics (comma-separated): ym:s:visits, ym:s:users, ym:s:pageviews, ym:s:bounceRate, ym:s:avgVisitDurationSeconds, ym:s:newUsers

Dimensions (comma-separated, optional — groups the result): ym:s:date, ym:s:lastTrafficSource, ym:s:startURL, ym:s:deviceCategory, ym:s:regionCountry, ym:s:UTMSource

date1 / date2: YYYY-MM-DD or relative (today, yesterday, NdaysAgo). filters: Metrika filter expression, e.g. "ym:s:deviceCategory=='mobile'". sort: field to sort by; prefix with '-' for descending, e.g. "-ym:s:visits".

Returns the raw Reporting API response (query meta, totals and data rows).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNo
date1No7daysAgo
date2Notoday
limitNo
filtersNo
metricsYes
counter_idYes
dimensionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose that it is a read of aggregated stats and describes the return shape (query meta, totals, data rows). It says nothing about auth/permissions, rate limits, or cost of expensive dimension combinations, which are significant gaps for a query tool.

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?

Front-loaded with the core action, then cleanly grouped headers for metrics, dimensions, dates, filters, and sort, each with a concrete example. The metric/dimension enumerations are long but justified given 0% schema coverage; the trailing return-value sentence is slightly redundant since an output schema exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no schema descriptions, the description supplies the domain vocabulary needed to build a valid call. The gaps are the undocumented counter_id origin (the list_counters sibling) and the limit parameter, but the output schema means return values need not be re-explained.

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 0% across 8 parameters, so the description must compensate, and it largely does: it enumerates valid metric and dimension names, explains date1/date2 relative syntax (NdaysAgo, today, yesterday), filter expression syntax, and the '-' descending prefix for sort. It omits counter_id (required, only inferred from 'Metrika counter') and the limit parameter entirely.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

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

The name 'query' is generic, but the first sentence clarifies the specific action and resource: a Reporting API query against a Metrika counter returning aggregated stats. It does not explicitly contrast itself with the sibling list_counters, but the resource scope is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the enumerated field names and filter/sort syntax, and 'aggregated stats' hints at what kind of data this returns versus raw logs. However, it never states when to prefer this tool, nor that counter_id must first come from list_counters, and gives no exclusions.

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.