Skip to main content
Glama
expremiental

yandex-metrika-mcp

by expremiental

Query

query

Run Yandex Metrika Reporting API queries to retrieve aggregated traffic metrics, sessions, users, and pageviews, with optional dimensions, filters, and date ranges.

Instructions

Run a Reporting API query against a Metrika counter (aggregated stats).

Pass Metrika field names directly. Common ones:

Metrics (comma-separated): ym:s:visits, ym:s:users, ym:s:pageviews, ym:s:bounceRate, ym:s:avgVisitDurationSeconds, ym:s:newUsers

Dimensions (comma-separated, optional — groups the result): ym:s:date, ym:s:lastTrafficSource, ym:s:startURL, ym:s:deviceCategory, ym:s:regionCountry, ym:s:UTMSource

date1 / date2: YYYY-MM-DD or relative (today, yesterday, NdaysAgo). filters: Metrika filter expression, e.g. "ym:s:deviceCategory=='mobile'". sort: field to sort by; prefix with '-' for descending, e.g. "-ym:s:visits".

Returns the raw Reporting API response (query meta, totals and data rows).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNo
date1No7daysAgo
date2Notoday
limitNo
filtersNo
metricsYes
counter_idYes
dimensionsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states the return shape: 'Returns the raw Reporting API response (query meta, totals and data rows).' It also clarifies that Metrika field names are passed through directly, which sets expectations for raw passthrough behavior. It does not mention permissions, rate limits, or side effects, but for a query operation the return-value disclosure is substantive.

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 well-structured and front-loaded: purpose first, then grouped parameter guidance, then return behavior. Each section is minimal and useful, with practical examples but no filler. The organization makes it easy for an agent to scan and extract the needed details.

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?

Given an output schema exists and 8 parameters are involved, the description covers the critical semantics well and even documents return shape. The only gaps are counter_id and limit, which are relatively self-evident from names and schema types. The description is sufficient for an agent to construct a correct query in most cases, though a note on pagination or limit behavior would fully close the gap.

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 0%, so the description must compensate, and it largely does. It explains metrics, dimensions, date1/date2, filters, and sort with concrete examples and formats. However, it does not explain counter_id or limit, leaving those to inference from names and types. Overall, the description provides strong semantic value for most parameters.

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 opens with a specific verb+resource: 'Run a Reporting API query against a Metrika counter (aggregated stats).' This clearly distinguishes it from the sibling list_counters, which is about enumerating counters rather than executing queries. The purpose is unambiguous and action-oriented.

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 provides extensive how-to guidance: which metrics and dimensions to pass, date formats, filter syntax, and sort prefix. It makes the intended use case clear (aggregated stats queries), though it does not explicitly say when not to use it or mention list_counters as an alternative. Context is clear; exclusions are absent.

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