Skip to main content
Glama
Rezlazy

yandex-metrika-mcp

by Rezlazy

stat_bytime

Retrieves time series analytics data from Yandex Metrika for charts and trend analysis. Group metrics by day, week, month, or hour to visualize performance over time.

Instructions

Yandex Metrika Reports API. Docs: https://yandex.ru/dev/metrika/ru/stat/ Time series report — GET /stat/v1/data/bytime. Use for charts and trends.

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)
groupNoTime grouping: day, week, month, quarter, year, hour, minute, auto, all, etc. (default: week)
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
annotation_groupsNoAnnotation groups comma-separated (when include_annotations=true)
include_undefinedNoInclude rows with undefined dimension values (first dimension only)
proposed_accuracyNoAllow API to auto-increase accuracy for small samples
include_annotationsNoInclude chart annotations in response
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.4/5.0
Behavior2/5

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

There are no annotations, so the description alone must disclose behavior like auth requirements, rate limits, sampling defaults, or response characteristics beyond 'time series report.' It only identifies the endpoint and intended use, which is thin behavioral context for a 20-parameter API call.

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 very short, front-loads the time series nature and endpoint, and includes a documentation link. Every part is useful and nothing is redundant or padded.

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 schema covers parameter semantics 100%, but the tool is complex (20 params), has no output schema, and no annotations. The description does not cover auth, pagination, limitations, format nuances, or how this tool relates to sibling stat_* tools, leaving a significant contextual gap.

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 input schema has 100% description coverage for all 20 parameters, so the schema already carries the semantic load. The tool description adds no parameter-specific meaning, but with full schema coverage the baseline of 3 is appropriate.

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 endpoint (GET /stat/v1/data/bytime) and characterizes it as a time series report for charts and trends, so an agent can infer the core function. It does not explicitly contrast it with sibling report tools like stat_data or stat_drilldown, which keeps it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use for charts and trends' gives an explicit use case and tells an agent when this tool is appropriate. It does not name alternatives or state when not to use it, so it falls short of a 5.

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