Skip to main content
Glama
askads

Yandex Metrica MCP

Get statistics

get_statistics
Read-only

Retrieve web analytics data from Yandex Metrica: visits, users, pageviews, bounce rate, and conversions. Group by date, traffic source, or device; apply filters, sorting, and pagination.

Instructions

Queries the Yandex Metrica Reporting API (stat/v1/data) for a counter. By DEFAULT returns one aggregated row over the period (no dimensions) with visits/users/pageviews/bounceRate/avgVisitDuration. Add dimensions to split rows (ym:s:date for a daily trend, ym:s:lastTrafficSource for traffic sources, ym:s:deviceCategory for devices), metrics to pick KPIs — for conversions use ym:s:goalreaches / ym:s:goalconversionRate (get goal ids from list_goals). The response carries totals (grand total over ALL rows — use it for «сколько всего», no need to sum), total_rows, and sampled/sample_share (sampled=true means the data is approximate; narrow the range or pass accuracy=full for exact figures). counterId defaults to YANDEX_METRIKA_COUNTER_ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort field; prefix with '-' for descending, e.g. -ym:s:visits.
date1NoStart date YYYY-MM-DD or relative (today, yesterday, NdaysAgo). Default 7daysAgo.
date2NoEnd date YYYY-MM-DD or relative. Default yesterday.
limitNoMax rows per page.
offsetNo1-based row offset for pagination.
filtersNoMetrica filter expression, e.g. ym:s:deviceCategory=='mobile'.
metricsNoMetrics, e.g. ym:s:visits, ym:s:users, ym:s:bounceRate, ym:s:goal<id>reaches. Defaults to a common set.
accuracyNoSampling accuracy: 'full' for exact (slower), or 0..1. Default the API's auto.
counterIdNoCounter id. Defaults to YANDEX_METRIKA_COUNTER_ID.
dimensionsNoGroup-by dimensions, e.g. ym:s:date, ym:s:lastTrafficSource, ym:s:deviceCategory. Omit for a period total.
autoPaginateNoFetch all rows by following limit/offset (merges data, carries totals).
Behavior5/5

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

Annotations declare readOnlyHint=true and openWorldHint=true. The description adds critical behavioral context: sampling behavior (sampled flag, accuracy parameter), pagination (autoPaginate merges data), and response structure (totals, total_rows, sample_share). No contradictions with annotations.

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 front-loaded with the purpose and default behavior. Every sentence adds value, explaining defaults, customization options, and response details. It is slightly lengthy but necessary given the complexity of the tool.

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

Completeness5/5

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

Despite having 11 parameters and no output schema, the description covers the response structure (totals, total_rows, sampled), explains sampling and accuracy, pagination, filtering, and default values. This provides sufficient context for correct invocation.

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

Parameters5/5

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

Schema coverage is 100% with parameter descriptions, but the description adds significant value beyond schema: explains default behavior for dimensions/metrics, provides concrete examples (ym:s:date, ym:s:goal<goalId>reaches), and clarifies default dates and counterId.

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 it queries the Yandex Metrica Reporting API for a counter, specifies default aggregation (one row), and explains how to customize with dimensions/metrics. It distinguishes itself from sibling tools like list_counters and raw_request by focusing on data retrieval and aggregation.

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 by detailing features (defaults, dimensions, metrics, pagination, sampling) but does not explicitly state when to use this tool vs. alternatives like raw_request. No exclusions or when-not-to-use guidance is provided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/askads/mcp-yandex-metrica'

If you have feedback or need assistance with the MCP directory API, please join our Discord server