Skip to main content
Glama
Rezlazy

yandex-metrika-mcp

by Rezlazy

stat_pivot

Build pivot-table reports from Yandex Metrika data by setting row dimensions and column pivot dimensions. Use this tool to cross-analyze metrics for deeper insights.

Instructions

Yandex Metrika Reports API. Docs: https://yandex.ru/dev/metrika/ru/stat/ Pivot table — GET /stat/v1/data/pivot. Rows by dimensions, columns by pivot_dimensions.

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)
dimensionsNoDimensions (groupings) comma-separated, max 10. See https://yandex.ru/dev/metrika/ru/stat/attrandmetr/dim_all.md
pivot_limitNoPivot columns per page, max 100 (default: 5)
pivot_offsetNoFirst pivot column index, starting from 1 (default: 1)
pivot_dimensionsNoPivot column dimensions comma-separated, max 10
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)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description bears the full burden of behavioral disclosure. It mentions the HTTP method (GET) and the row/column structure, but does not disclose authentication needs, rate limits, sampling behavior, pagination behavior, or what the response looks like.

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 compact and free of fluff. The API context and docs link are useful, and the row/column explanation is front-loaded. It could be slightly more informative without becoming verbose, but it is well-structured for its length.

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 20-parameter API tool with no annotations and no output schema, the description is too thin. It does not explain when to use this tool, what the response contains, pagination behavior, or authentication requirements. The docs URL helps but is not a substitute for in-description guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by explaining that dimensions form rows and pivot_dimensions form columns, which is a relationship not captured in the individual parameter descriptions.

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 the exact API endpoint (GET /stat/v1/data/pivot) and explains the core pivot-table mechanics: rows by dimensions, columns by pivot_dimensions. It is clear about the resource but does not use an explicit verb like 'get' or 'retrieve', and it does not explicitly distinguish itself from sibling stat_* tools beyond the word 'pivot'.

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?

There is no guidance on when to use stat_pivot versus stat_data, stat_drilldown, stat_comparison, or other siblings. The description only states what the tool is, not when it is the right choice or when an alternative would be preferable.

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