Skip to main content
Glama
Rezlazy

yandex-metrika-mcp

by Rezlazy

stat_comparison_drilldown

Compare two segments in Yandex Metrika and drill down into hierarchical report data to analyze differences between segment A and B.

Instructions

Yandex Metrika Reports API. Docs: https://yandex.ru/dev/metrika/ru/stat/ Segment comparison drill-down — GET /stat/v1/data/comparison/drilldown. Tree report comparing segments A and B.

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
date1_aNoSegment A period start: YYYY-MM-DD, today, yesterday, ndaysAgo (default: 6daysAgo)
date1_bNoSegment B period start: YYYY-MM-DD, today, yesterday, ndaysAgo (default: 6daysAgo)
date2_aNoSegment A period end: YYYY-MM-DD, today, yesterday, ndaysAgo (default: today)
date2_bNoSegment B period end: YYYY-MM-DD, today, yesterday, ndaysAgo (default: today)
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)
filters_aNoSegmentation filter for segment A
filters_bNoSegmentation filter for segment B
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

B3.4/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full burden of behavioral disclosure. It mentions the HTTP method (GET) and 'tree report', which implies read-only and hierarchical structure, but does not disclose authentication requirements, rate limits, pagination behavior, response format details, error handling, or the effect of the drill-down parameters. Critical behavioral traits like sampling (accuracy parameter) and the meaning of 'undefined' values are absent.

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

Conciseness5/5

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

The description is extremely concise: two sentences, front-loaded with the API docs link and endpoint, followed by a one-line functional summary. Every word earns its place with no redundancy or fluff. It efficiently communicates the core purpose without unnecessary detail.

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?

Despite having 25 parameters and 2 required, the description provides minimal high-level context. It does not explain how the drill-down works, how segments A and B interact, how to interpret the 'tree report' output, or any typical use cases. Since there is no output schema, the description should give more guidance on expected results, but it remains terse. The external docs link is helpful but not sufficient for an agent to fully understand the tool's behavior.

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?

The schema covers 100% of parameters with individual descriptions, so the baseline is 3. The tool description adds no parameter-specific semantics beyond what the schema already provides; it only restates the purpose. It does not clarify relationships between segment-specific date/filter parameters or the drill-down mechanism, but the schema descriptions are sufficient for basic understanding.

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

Purpose5/5

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

The description clearly states the tool's purpose: a segment comparison drill-down report that compares segments A and B. It explicitly names the API endpoint (GET /stat/v1/data/comparison/drilldown) and describes the output as a 'tree report'. This distinguishes it from sibling tools like stat_comparison (non-drilldown comparison) and stat_drilldown (drilldown without comparison), making the purpose 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?

The description implies usage through the name and phrasing ('comparing segments A and B', 'drill-down'), but does not explicitly state when to use this tool versus alternatives like stat_comparison or stat_drilldown. There are no exclusions or conditional guidance, leaving the agent to infer based on the name and sibling context.

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