Skip to main content
Glama
Rezlazy

yandex-metrika-mcp

by Rezlazy

stat_drilldown

Query Yandex Metrika drill-down tree report by counter IDs and metrics. Fetch one tree level per request; pass parent_id to access nested levels.

Instructions

Yandex Metrika Reports API. Docs: https://yandex.ru/dev/metrika/ru/stat/ Drill-down tree report — GET /stat/v1/data/drilldown. One tree level per request; use parent_id for nested levels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYesCounter IDs, comma-separated (e.g. 44147844 or 44147844,2215573)
langNoResponse language
sortNoSort by dimensions/metrics comma-separated. Prefix with - for descending
date1NoPeriod start: YYYY-MM-DD, today, yesterday, or ndaysAgo (default: 6daysAgo)
date2NoPeriod end: YYYY-MM-DD, today, yesterday, or ndaysAgo (default: today)
limitNoPage size, max 100000 (default: 100)
formatNoResponse format: json (default) or csv
offsetNoFirst row index, starting from 1 (default: 1)
presetNoReport preset name. See https://yandex.ru/dev/metrika/ru/stat/presets.md
filtersNoSegmentation filter expression. See https://yandex.ru/dev/metrika/ru/stat/segmentation.md
metricsYesMetrics comma-separated, max 20. Use ym:s: prefix for visits or ym:pv: for hits. See https://yandex.ru/dev/metrika/ru/stat/attrandmetr/dim_all.md
accuracyNoSample size for report (sampling). See https://yandex.ru/dev/metrika/ru/stat/sampling.md
timezoneNoTimezone as ±hh:mm, e.g. +03:00 (plus sign as %2B in URL)
parent_idNoParent row path for drill-down (JSON list of keys). Omit for root level
dimensionsNoDimensions (groupings) comma-separated, max 10. See https://yandex.ru/dev/metrika/ru/stat/attrandmetr/dim_all.md
include_undefinedNoInclude rows with undefined dimension values (first dimension only)
proposed_accuracyNoAllow API to auto-increase accuracy for small samples
direct_client_loginsNoYandex Direct client logins comma-separated (Direct expenses reports)
only_expandable_undefinedNoRemove non-expandable undefined values (requires include_undefined=true)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

C2.9/5.0
Behavior2/5

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

Without annotations, the description carries full burden. It discloses that this is a GET report and that it returns one tree level at a time, which is useful. It does not explain response structure, hierarchy semantics, authentication/scope needs, pagination, or limits, so significant behavioral context is left unstated.

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 a compact three-part structure: API family, endpoint, and the critical drill-down behavior. It earns its length, though the API family sentence could be tighter.

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?

For a 19-parameter tool with no output schema and no annotations, this two-sentence description leaves too much unsaid about return format, drill-down graph semantics, and how the endpoint fits the report workflow. The docs link mitigates but does not make the description self-sufficient.

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 coverage is 100%, so all parameters are described in the schema; baseline is 3. The description adds only the parent_id drill-down usage (one level per request) — helpful but not enough to raise the score.

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 this as the drill-down tree report endpoint and names the exact REST path (GET /stat/v1/data/drilldown), which distinguishes it from flat/summary report siblings like stat_data or stat_pivot. It does not use a verb like 'retrieves' but the resource and operation are clear enough.

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?

It gives one usage signal — one tree level per request and parent_id for nested levels — but never says when to choose this over the sibling stat_comparison_drilldown or other stat_* report tools. No alternatives or exclusions are mentioned, so an agent would have to infer the right choice from the name.

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