Skip to main content
Glama
artgas1

yandex-metrika-mcp-server

Получение сводной таблицы

metrika_stat_pivot
Read-onlyIdempotent

Fetch time-bucketed summary metrics from Yandex Metrika to monitor dynamics and build charts over daily, weekly, or monthly intervals.

Instructions

Получение сводной таблицы. Позволяет получить данные с разбивкой по времени (например, по дням, неделям, месяцам). Используйте данный тип запроса для построения графиков и отслеживания динамики. [GET https://api-metrika.yandex.net/stat/v1/data/pivot] Документация: https://yandex.ru/dev/metrika/ru/stat/openapi/pivot.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.
pivot_limitNoКоличество столбцов на странице выдачи. По умолчанию: 5.
pivot_offsetNoИндекс первой строки выборки, начиная с 1. По умолчанию: 1.
pivot_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

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds the time-breakdown behavior and an endpoint URL, but does not disclose auth needs, rate limits, sampling effects, or response format. This is adequate but not rich beyond annotations.

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?

Three short sentences lead with the purpose, then the use case and links. No filler or repetition, though the documentation and endpoint could arguably be combined. Efficient and front-loaded.

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 tool has 22 parameters, no output schema, and only a minimal description. The description does not explain the response structure of a pivot report (rows vs columns, pivot_dimensions role, pagination via limit/offset), which an agent would need to interpret results correctly. Given the tool's complexity, the description is too thin for full call success.

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 parameters are already fully documented. The description adds no parameter-specific semantics beyond the generic 'time breakdown' context, which is not tied to any parameter. Baseline 3 applies.

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 description identifies a specific verb+resource ('Получение сводной таблицы') and clarifies the capability as data with time breakdown for charts and dynamics. It is clearer than a tautology, but it does not explicitly contrast itself with siblings like metrika_stat_data or metrika_stat_bytime, so an agent may still need to infer the exact scope.

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?

The description gives an intended use ('для построения графиков и отслеживания динамики'), which is a clear context signal. However, it provides no exclusions and names no alternatives among the many stat siblings, so guidance on when not to use this tool is absent.

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