Skip to main content
Glama
askads

Yandex Metrica MCP

Get statistics

get_statistics
Read-onlyIdempotent

Query Yandex Metrica to get web analytics data like visits, users, and conversions. Group by date, traffic source, or device, and apply filters for targeted analysis.

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 (today, yesterday, NdaysAgo). Default yesterday.
limitNoMax rows per page (ignored when autoPaginate is set).
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 a 0..1 share. Default the API's auto.
maxPagesNoPage cap for autoPaginate. Default 100.
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 the API-max page size (merges data, carries totals). Ignores `limit`; capped by maxPages and by row/byte limits (flags _truncated when hit).
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint true. Description adds context on sampling, pagination, and response fields, enhancing transparency without contradiction.

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 a single paragraph with dense information; it is front-loaded but could benefit from more structured formatting like bullet points.

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?

Given the complexity and lack of output schema, the description thoroughly covers response structure, pagination, sampling, and parameter usage, making it nearly complete.

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?

With 100% schema coverage, the description adds significant value by providing examples, default values, and parameter interactions (e.g., limit ignored with autoPaginate).

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, distinguishing it from sibling tools like list_counters and list_goals.

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?

The description explains default behavior, how to use dimensions/metrics, and references list_goals for goal IDs. However, it does not explicitly state when not to use this tool versus alternatives.

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