Skip to main content
Glama
stufently

yandex-metrica-mcp

yandex_metrica_get_report

Read-onlyIdempotent

Run Yandex Metrica Reporting API queries to return aggregated visits, users, bounce rate, and traffic source stats. Use for summaries, breakdowns, or two-period comparisons.

Instructions

Run a Yandex Metrica Reporting API query and return aggregated statistics such as visits, users, bounce rate, and traffic sources. Use when the user wants a summary, a breakdown, or a comparison of two periods via date1_b and date2_b. Do not use this for row-level visits or pageviews; call yandex_metrica_evaluate_logs_request and the other Logs API tools. Metrics use the ym:s: prefix for visits and ym:pv: for hits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage for dimension value names (default: ru)
sortNoSort fields. Prefix with '-' for descending, e.g. ['-ym:s:visits', 'ym:s:date']
date1NoStart date (YYYY-MM-DD or 'today', 'yesterday', '7daysAgo'). Default: 7daysAgo
date2NoEnd date (YYYY-MM-DD or relative). Default: today
limitNoRows to return (default 100)
offsetNoRow offset for pagination (1-based)
presetNoPreset report name (e.g. 'sources_summary'). Overrides metrics/dimensions.
date1_bNoComparison segment B start date. When provided with date2_b, uses the comparison endpoint (/stat/v1/data/comparison). date1/date2 become segment A. Each row returns two sets of metrics.
date2_bNoComparison segment B end date. Must be provided together with date1_b.
filtersNoFilter expression, e.g. "ym:s:trafficSourceName=='Organic Search'"
metricsYesMetrics to include, e.g. ['ym:s:visits', 'ym:s:pageviews', 'ym:s:bounceRate']. Max 20.
accuracyNoSampling accuracy (default: medium)
currencyNoCurrency code (ISO 4217), e.g. 'RUB'
filters_aNoSegmentation filter for segment A only (comparison mode)
filters_bNoSegmentation filter for segment B only (comparison mode)
dimensionsNoDimensions for grouping, e.g. ['ym:s:date', 'ym:s:regionCityName']
attributionNoAttribution model for traffic source metrics. 'lastsign' = last significant source; 'automatic' = auto-attribution.
counter_idsYesOne or more counter IDs to query
include_undefinedNoInclude rows with undefined dimension values

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and openWorld. The description adds context beyond them: the switch to the comparison endpoint when date1_b/date2_b are supplied, the returned statistic families, and the ym:s:/ym:pv: prefix convention. It does not mention rate limits or quota behavior, so it is strong but not exhaustive.

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?

Four sentences, purpose front-loaded, followed by usage, exclusion, and a technical prefix note. Mostly waste-free, though the closing prefix sentence feels appended rather than integrated with the flow.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 19-parameter query tool with no output schema, the description covers domain, usage, exclusions, and metric naming conventions, and it sketches the returned aggregates. An agent has enough to call it correctly, though return shape (row structure, comparison-mode dual metric sets) is only lightly implied.

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 baseline is 3, but the description adds genuine semantic value by explaining the ym:s: vs ym:pv: metric prefix families and the comparison-mode trigger (date1_b/date2_b), which helps construct valid metrics/filters. It does not restate the parameter table.

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?

States a specific verb+resource ('Run a Yandex Metrica Reporting API query and return aggregated statistics') with concrete outputs (visits, users, bounce rate, traffic sources). It explicitly contrasts itself with the Logs API siblings (yandex_metrica_evaluate_logs_request), so an agent can distinguish it without opening any schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('summary, breakdown, or comparison of two periods via date1_b and date2_b') and a clear when-not ('Do not use this for row-level visits or pageviews') naming the alternative tools. Nothing is left to inference.

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