Skip to main content
Glama
artgas1

yandex-metrika-mcp-server

Drill down

metrika_stat_drilldown
Read-onlyIdempotent

Build multi-level tree reports from Yandex Metrica data by drilling down through grouped dimensions to analyze detailed metrics.

Instructions

Drill down. Позволяет сформировать многоуровневый (древовидный) отчет. При этом каждому уровню соответствует одна группировка. [GET https://api-metrika.yandex.net/stat/v1/data/drilldown] Документация: https://yandex.ru/dev/metrika/ru/stat/openapi/drilldown.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.
parent_idNoВыбор строки для дальнейшего развертывания. Состоит из json-списка ключей.
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.
only_expandable_undefinedNoУдалять из результата нераскрывающиеся неопределённые значения. Имеет смысл только в случае include_undefined=true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.3.1

TDQS

B3.1/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds no behavioral details beyond the functional purpose (e.g., pagination, tree navigation, or response format). It does not contradict annotations, but adds minimal value in terms of behavioral disclosures.

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?

The description is concise and front-loaded with the core purpose. The opening 'Drill down.' is somewhat redundant with the title, but the subsequent sentence adds meaningful detail, and the API endpoint plus documentation link are useful. No unnecessary fluff.

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 is complex (21 parameters, no output schema), and the description provides minimal context for an agent to understand the drilldown concept or navigate the hierarchical response. While the schema is thorough, the description does not compensate for missing output schema or explain how tree levels relate to parameters like parent_id or include_undefined.

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 the schema already documents all 21 parameters. The description includes no parameter-level information, so it adds no value beyond the baseline 3.

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 clearly states that the tool generates a multi-level (tree-like) report with each level corresponding to one grouping. This is a specific verb+resource (drill down, build hierarchical report) and distinguishes it from flat-report siblings like metrika_stat_data, though it does not explicitly name alternatives.

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 provides no guidance on when to use this tool versus its siblings. It does not mention alternatives, conditions, or exclusions. The use case is only implied by the purpose statement ('drill down'), leaving selection to inference.

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