Skip to main content
Glama
artgas1

yandex-metrika-mcp-server

Таблица

metrika_stat_data
Read-onlyIdempotent

Fetches Yandex Metrica statistics into a table format using counter IDs and metrics, enabling access to report data for analysis.

Instructions

Таблица. Предоставляет доступ к статистическим данным Яндекс Метрики, включая данные, доступные в отчетах. Возвращает результат в виде таблицы. [GET https://api-metrika.yandex.net/stat/v1/data] Документация: https://yandex.ru/dev/metrika/ru/stat/openapi/data_1.md

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesИдентификаторы счетчиков, через запятую. Пример: 44147844,2215573.
langNoЯзык.
sortNoСписок группировок и метрик, разделенных запятой, по которым осуществляется сортировка. По умолчанию сортировка производится по убыванию (указан знак `-` перед группировкой или метрикой). Чтобы отсортировать данные по возрастанию, удалите знак `-`.
date1NoДата начала периода выборки в формате YYYY-MM-DD. Также используйте значения: `today`, `yesterday`, `ndaysAgo`. По умолчанию: 6daysAgo.
date2NoДата окончания периода выборки в формате YYYY-MM-DD. Также используйте значения: `today`, `yesterday`, `ndaysAgo`. По умолчанию: today.
limitNoКоличество элементов на странице выдачи. По умолчанию: 100.
offsetNoИндекс первой строки выборки, начиная с 1. По умолчанию: 1.
presetNo[Шаблон отчета](https://yandex.ru/dev/metrika/ru/stat/presets.md). Пример: sources_summary.
prettyNoЗадает форматирование результата. Чтобы использовать форматирование, укажите значение `true`. По умолчанию: false.
filtersNoФильтр [сегментации](https://yandex.ru/dev/metrika/ru/stat/segmentation.md).
metricsYesСписок метрик, разделенных запятой. Пример: ym:s:pageviews.
accuracyNoРазмер выборки, используемой для отчета. Позволяет управлять [семплированием](https://yandex.ru/dev/metrika/ru/stat/sampling.md) (количеством визитов, использованных при расчете итогового значения).
callbackNoФункция обратного вызова, которая обрабатывает ответ API.
timezoneNoЧасовой пояс в формате ±hh:mm в диапазоне [-23:59; +23:59] (знак плюса нужно передавать как `%2B`), Пример: +03:00.
dimensionsNoСписок группировок, разделенных запятой. Пример: ym:s:trafficSource.
include_undefinedNoВключает в ответ строки, для которых значения группировок не определены. Влияет только на первую группировку. По умолчанию выключено.
proposed_accuracyNoЕсли параметр выставлен в `true`, API имеет право автоматически увеличивать accuracy до рекомендованного значения.Когда идет запрос в маленькую таблицу с очень маленьким семплингом, параметр поможет получить осмысленные результаты.
human_traffic_onlyNoРезать роботов. По умолчанию true. Добавляет к filters: ym:s:isRobot=='no'. Не применяется к метрикам и измерениям ym:ad: и ym:ev: — Метрика отвечает на них 400.
direct_client_loginsNoЛогины клиентов Яндекс Директа, через запятую. Могут использоваться для формирования отчета [Директ-расходы](https://yandex.ru/dev/metrika/ru/stat/direct-clicks.md). Пример: login1,login2.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.3.1

TDQS

C2.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint, and destructiveHint=false, so the safety profile is clear. The description adds the specific HTTP GET endpoint and a documentation link, which are useful behavioral details. However, it does not describe pagination, sampling behavior, or error conditions, but these are not essential given the rich schema and annotations.

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

Conciseness3/5

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

The description is relatively short, but it contains redundancy: 'Таблица.' repeats the titlecars, and 'Возвращает результат в виде таблицы' restates the previous point. The useful endpoint and documentation links are included. It is not overly long, but not every sentence earns its place.

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

Completeness2/5

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

The description is too generic for a tool with 10 siblings. It does not explain what makes this endpoint distinct (e.g., plain data without drilldown/pivot/comparison aggregations) or when a caller would prefer it. The missing output schema is not a major issue, but the lack of sibling differentiation leaves the description incomplete for correct selection.

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%, with all 19 parameters documented in the input schema. The description itself does not mention any parameters, so it adds no semantics beyond the schema. Baseline 3 is appropriate.

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

Purpose2/5

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

The description states that the tool provides access to Yandex Metrika statistical data, including report data, and returns a table. However, this is extremely broad and does not distinguish it from siblings like metrika_stat_drilldown or metrika_stat_pivot, which also provide statistical data. The title 'Таблица' adds little specificity, and the phrase 'returns the result as a table' is true of all stat tools.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus its siblings. It does not mention alternatives, exclusions, or typical use cases. An agent would not be able to decide between metrika_stat_data and the other stat_* tools based on this text alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.