io.github.dontsovcmc/yandex-metrika
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@io.github.dontsovcmc/yandex-metrikaget visitors for last 7 days"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-yandex-metrika
MCP-сервер, CLI-утилита и библиотека Pydantic-моделей для API Яндекс Метрики.
MCP-сервер — интеграция с Claude Code, Claude Desktop и другими MCP-клиентами
CLI-утилита — работа с API из терминала, скрипты и автоматизация
Pydantic-модели — типизированные модели API для использования в своих Python-программах
Все данные остаются на вашем компьютере — токен никуда не передаётся.
Оглавление
Related MCP server: ya-metrics-mcp
Возможности
Отчёты (Reporting API)
Инструмент | CLI | Описание |
|
| Табличный отчёт по метрикам и измерениям |
|
| Отчёт по времени (группировка: час/день/неделя/месяц) |
|
| Drill down отчёт с раскрытием уровней |
|
| Сравнение сегментов/периодов |
| — | Сравнение с drill down |
Счётчики
Инструмент | CLI | Описание |
|
| Список счётчиков (поиск, фильтрация) |
|
| Информация о счётчике |
|
| Создать счётчик |
|
| Изменить счётчик |
|
| Удалить счётчик |
|
| Восстановить удалённый |
Цели
Инструмент | CLI | Описание |
|
| Список целей счётчика |
|
| Информация о цели |
|
| Создать цель (url/number/step/action/...) |
| — | Изменить цель |
|
| Удалить цель |
Фильтры
Инструмент | CLI | Описание |
|
| Список фильтров |
| — | Информация о фильтре |
|
| Создать фильтр (IP, URL, реферер) |
| — | Изменить фильтр |
|
| Удалить фильтр |
Доступ (Grants)
Инструмент | CLI | Описание |
|
| Список разрешений |
|
| Выдать разрешение |
| — | Изменить разрешение |
|
| Удалить разрешение |
Операции
Инструмент | CLI | Описание |
|
| Список операций |
| — | Информация об операции |
|
| Создать операцию (cut_parameter, to_lower, ...) |
| — | Изменить операцию |
|
| Удалить операцию |
Сегменты
Инструмент | CLI | Описание |
|
| Список сегментов |
| — | Информация о сегменте |
|
| Создать сегмент |
| — | Изменить сегмент |
|
| Удалить сегмент |
Метки
Инструмент | CLI | Описание |
|
| Список меток |
|
| Создать метку |
| — | Изменить метку |
|
| Удалить метку |
| — | Привязать метку к счётчику |
| — | Отвязать метку |
Аккаунты и представители
Инструмент | CLI | Описание |
|
| Список аккаунтов |
| — | Удалить аккаунт |
|
| Список представителей |
|
| Добавить представителя |
|
| Удалить представителя |
Примечания на графике
Инструмент | CLI | Описание |
|
| Список примечаний |
|
| Создать примечание |
| — | Изменить примечание |
| — | Удалить примечание |
Фильтры доступа
Инструмент | CLI | Описание |
| — | Список фильтров доступа |
| — | Создать фильтр доступа |
| — | Изменить фильтр доступа |
| — | Удалить фильтр доступа |
Logs API
Инструмент | CLI | Описание |
|
| Список запросов логов |
| — | Информация о запросе |
|
| Создать запрос (hits/visits) |
|
| Оценить возможность запроса |
| — | Очистить обработанные логи |
| — | Отменить запрос |
|
| Скачать часть лога (TSV) |
Импорт данных
Инструмент | CLI | Описание |
|
| Загрузить оффлайн-конверсии |
| — | Список загрузок конверсий |
| — | Инфо о загрузке |
|
| Загрузить звонки |
| — | Список загрузок звонков |
| — | Инфо о загрузке звонков |
|
| Загрузить расходы |
| — | Загрузить параметры пользователей |
MCP-сервер
Установка
Шаг 1. Получить OAuth-токен Яндекс Метрики
Зарегистрируйте приложение на oauth.yandex.com
Укажите права:
metrika:read,metrika:writeПолучите токен:
https://oauth.yandex.com/authorize?response_type=token&client_id=<ваш_client_id>
Шаг 2. Подключить MCP-сервер
Подключение к Claude Code
Способ 1: через uvx (не требует установки пакета)
Требуется uv — если не установлен:
curl -LsSf https://astral.sh/uv/install.sh | sh
claude mcp add yandex-metrika \
-e YANDEX_METRIKA_TOKEN=ваш_токен \
-- uvx mcp-server-yandex-metrikaСпособ 2: через pip
pip install mcp-server-yandex-metrika
claude mcp add yandex-metrika \
-e YANDEX_METRIKA_TOKEN=ваш_токен \
-- mcp-server-yandex-metrikaДля удаления:
claude mcp remove yandex-metrikaПодключение к Claude Desktop
Добавьте в конфигурационный файл:
Клиент | ОС | Путь к файлу |
Claude Code | все |
|
Claude Desktop | macOS |
|
Claude Desktop | Windows |
|
Claude Desktop | Linux |
|
Через uvx:
{
"mcpServers": {
"yandex-metrika": {
"command": "uvx",
"args": ["mcp-server-yandex-metrika"],
"env": {
"YANDEX_METRIKA_TOKEN": "ваш_токен"
}
}
}
}Через pip (после pip install mcp-server-yandex-metrika):
{
"mcpServers": {
"yandex-metrika": {
"command": "python",
"args": ["-m", "mcp_server_yandex_metrika"],
"env": {
"YANDEX_METRIKA_TOKEN": "ваш_токен"
}
}
}
}Подключение через --mcp-config
Подключает сервер только на время одной сессии Claude, не сохраняя в настройки. Токен хранится в отдельном .env.mcp файле, а не в конфиге Claude.
Из JSON-строки:
claude --mcp-config '{"yandex-metrika":{"command":"bash","args":["-c","source ~/.env.mcp && exec uvx mcp-server-yandex-metrika"]}}'Из файла:
claude --mcp-config ~/mcp-servers.jsonПример ~/mcp-servers.json:
{
"yandex-metrika": {
"command": "bash",
"args": ["-c", "source ~/.env.mcp && exec uvx mcp-server-yandex-metrika"]
}
}Пример ~/.env.mcp:
YANDEX_METRIKA_TOKEN=ваш_токенШаг 3. Проверить
Попросите Claude: «Покажи список моих счётчиков Яндекс Метрики» — он вызовет ym_counters.
Примеры (MCP)
«Покажи статистику по визитам за последнюю неделю для счётчика 12345678» →
ym_stat_data«Создай цель "Покупка" типа url с условием contain "/thank-you"» →
ym_goal_create«Выгрузи логи визитов за январь 2024» →
ym_log_request_create
CLI-утилита
Установка (CLI)
pip install mcp-server-yandex-metrikaПеременная окружения YANDEX_METRIKA_TOKEN должна быть установлена:
export YANDEX_METRIKA_TOKEN=ваш_токенИли через файл:
mcp-server-yandex-metrika --env /path/to/.env countersФормат файла — KEY=VALUE, по одной переменной на строку, #-комментарии.
Использование (CLI)
Без аргументов запускается MCP-сервер, с командой — CLI. Все команды выводят JSON.
# Версия
mcp-server-yandex-metrika --version
# Справка
mcp-server-yandex-metrika --help
mcp-server-yandex-metrika <command> --helpПримеры команд
# Статистика визитов
mcp-server-yandex-metrika stat-data --ids 12345678 --metrics ym:s:visits,ym:s:users
# Список счётчиков
mcp-server-yandex-metrika counters --search "мой сайт"
# Цели счётчика
mcp-server-yandex-metrika goals 12345678
# Создать запрос логов
mcp-server-yandex-metrika log-request-create 12345678 \
--date1 2024-01-01 --date2 2024-01-31 \
--fields "ym:s:date,ym:s:visitID" --source visitsPydantic-модели
Пакет содержит типизированные Pydantic-модели всех объектов API. Модели можно использовать в своих Python-программах для валидации данных и автодополнения в IDE.
Установка (библиотеки)
pip install mcp-server-yandex-metrikaИспользование в своих программах
from mcp_server_yandex_metrika.models import CounterBrief, Goal
# Валидация данных из API
data = {"id": 12345678, "name": "Мой сайт", "status": "Active"}
counter = CounterBrief.model_validate(data)
print(counter.name) # type-safe доступ к полям
# Создание объекта
goal = Goal(name="Покупка", type="url")
print(goal.model_dump_json())Все модели используют extra="allow" для forward compatibility — неизвестные поля API не вызывают ошибок.
Полный список моделей: models.py
Переменные окружения
Переменная | Обязательная | По умолчанию | Описание |
| да | — | OAuth-токен Яндекс Метрики |
| нет |
| Таймаут HTTP-запросов к API (секунды) |
| нет |
| Таймаут скачивания файлов (секунды) |
Загрузка из файла
Вместо передачи переменных через -e можно указать файл:
mcp-server-yandex-metrika --env /path/to/.envФормат файла — KEY=VALUE, по одной переменной на строку, #-комментарии.
Работает в обоих режимах: MCP-сервер и CLI:
# MCP-сервер
claude mcp add yandex-metrika -- mcp-server-yandex-metrika --env ~/.config/metrika.env
# CLI
mcp-server-yandex-metrika --env ~/.config/metrika.env countersЛимиты API
30 запросов/секунду на IP
5000 запросов/день на пользователя
3 параллельных запроса на пользователя
200 запросов/5 минут для
/stat/v1/data/HTTP 420 при превышении лимитов
Разработка
pip install -e ".[test]"
ruff check src/ tests/
pytest tests/ -vЛицензия
MIT
Available Tools
12 toolsym_counterCRead-onlyIdempotent
Get counter details. field: goals,mirrors,grants,filters,operation.
| Name | Required | Description | Default |
|---|---|---|---|
| field | No | ||
| counter_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate readOnlyHint=true and idempotentHint=true, so the description adds little beyond stating 'Get counter details'. The mention of field options is useful but not sufficiently explained.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short but the second sentence is cryptic and not well-structured. Could be improved with clearer formatting (e.g., 'field options: goals, mirrors, grants, filters, operation').
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that an output schema exists, the description need not detail return values, but it fails to explain the field parameter's role or that counter_id is required. The cryptic field list leaves ambiguity, making it incomplete for agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description's listing of 'goals,mirrors,grants,filters,operation' attempts to add meaning to the 'field' parameter, but it is cryptic and does not clarify that these are possible values. The counter_id parameter is not mentioned.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Get counter details', which clearly identifies the action and object. However, it does not differentiate from sibling tools like 'ym_counters' (likely a list tool), leaving some ambiguity about when to use which.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. The description lacks context on prerequisites or scenarios, making it hard for an agent to decide appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_countersBRead-onlyIdempotent
List counters. Optional filters: search_string, permission (own/view/edit), status (Active/Deleted), per_page, offset.
| Name | Required | Description | Default |
|---|---|---|---|
| offset | No | ||
| status | No | ||
| per_page | No | ||
| permission | No | ||
| search_string | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. Description adds filter value hints (own/view/edit, Active/Deleted) but no additional behavioral details like pagination behavior or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence listing the action and optional filters. No redundant information, but could structure filter descriptions more clearly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Has output schema, so return values not needed. However, with 5 optional parameters and pagination, more context on typical usage or filter interactions would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, description lists parameter names and hints at allowed values (e.g., 'permission (own/view/edit)') but does not explain their precise meaning or default behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description states 'List counters' with optional filters, clearly indicating the action and resource. However, it does not differentiate from sibling tools like ym_counter or ym_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. No context on prerequisites, suitable scenarios, or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_executeA
Execute action by ID. params_json validated against action schema. Use ym_search to discover actions and their schemas first.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| params_json | No | {} |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate write operation (readOnlyHint=false). Description adds validation of params_json against schema but lacks details on side effects, error handling, or authorization needs. Adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with action, then validation, then usage suggestion. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Description covers prerequisite (use ym_search) and validation, but lacks context on authentication, idempotency, or error scenarios. Output schema exists so return values are covered. Missing some behavioral completeness for a mutation tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description must compensate. It mentions 'action ID' and 'params_json validated against action schema' but doesn't elaborate on format or constraints beyond what schema implicitly provides. Baseline score due to low coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states verb 'Execute' and resource 'action by ID'. Specific and distinguishes from sibling tool ym_search which is for discovery.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs to use ym_search first to discover actions and schemas, providing clear when-to-use and prerequisite guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_execute_fileA
Execute action that reads or writes a file (uploads/downloads). file_path must be under ~/... or /tmp/... Use ym_search to discover file actions (is_file=true).
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | ||
| file_path | Yes | ||
| params_json | No | {} |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate the tool is not read-only (readOnlyHint=false), and the description confirms it reads or writes. Beyond that, it adds file path constraints and the discoverability hint, but lacks details on side effects, permissions, or behavior in edge cases like overwriting or appending.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, consisting of two short sentences that convey purpose, constraints, and a usage hint. Every word earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the existence of an output schema and annotations, the description covers basic purpose and constraints. However, it omits details on the action parameter format and potential pitfalls, making it adequate but with noticeable gaps for a tool with 3 parameters and no schema descriptions.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description must compensate. It adds meaning for file_path (path restrictions) and hints that action values come from ym_search, but provides no explanation for params_json. This partial coverage is helpful but incomplete.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool executes an action that reads or writes a file, specifying the resource (file) and verb (execute). It differentiates from siblings like ym_search and ym_execute by focusing on file operations and directing users to ym_search for discovering actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides context on when to use the tool: after discovering file actions via ym_search with is_file=true. It also imposes file_path restrictions (~/... or /tmp/...), guiding proper usage. However, it does not explicitly state when not to use this tool or provide alternatives for non-file actions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_goalsBRead-onlyIdempotent
List goals for a counter.
| Name | Required | Description | Default |
|---|---|---|---|
| counter_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint and idempotentHint. The description confirms it's a list operation but adds no additional behavioral context beyond what annotations state.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise (4 words) with no unnecessary detail. However, it lacks structure such as parameter descriptions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given low complexity and presence of output schema, the description is minimally adequate. It fails to provide context about counter goals or usage scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description does not explain the purpose or source of counter_id. It only implies that counter_id identifies the counter, which is minimal compensation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List goals for a counter' is specific with a clear verb and resource, distinguishing it from sibling tools like ym_counters or ym_stat_data. However, it does not elaborate on what 'goals' or 'counter' mean.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. No mention of prerequisites, when not to use, or related tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_grantsCRead-onlyIdempotent
List access grants for a counter.
| Name | Required | Description | Default |
|---|---|---|---|
| counter_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, indicating safe read operation. The description adds no extra behavioral details (e.g., pagination, rate limits). It is adequate but does not enhance understanding beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise (6 words) with no wasted words. However, it is overly brief and could benefit from additional context without becoming verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given a single parameter, read-only nature, and presence of an output schema, the description is too minimal. It does not explain the output or any relationships with sibling tools, leaving the agent with insufficient context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description does not explain the counter_id parameter (its meaning, source, or format). It relies entirely on the parameter name, which is insufficient for clear usage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (List) and the resource (access grants for a counter). It distinguishes from sibling tools like ym_counters (list counters) and ym_counter (single counter info). However, it does not explain what 'access grants' are, which could be ambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool compared to siblings. No prerequisites or context provided (e.g., needing a counter_id from another tool). The description is too brief to inform usage decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_labelsARead-onlyIdempotent
List all labels.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. The description adds no extra behavioral context beyond what annotations provide.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise at two words. Every word is meaningful and the purpose is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a parameterless tool that lists all labels, the description is complete. Output schema exists, so return value structure is covered.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist, so schema coverage is trivially 100%. With 0 parameters, baseline is 4. Description adds no param info but none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'List all labels.' clearly states the verb (list) and resource (labels). It distinguishes from sibling tools like ym_search, ym_goals, etc., which operate on different resources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. It does not mention any prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_log_requestsBRead-onlyIdempotent
List log API requests for a counter.
| Name | Required | Description | Default |
|---|---|---|---|
| counter_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, so the description does not need to repeat those. However, it adds no additional behavioral context such as authentication needs, rate limits, or result limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded with the action. It is concise but could benefit from a bit more detail without being verbose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple operation and the presence of an output schema and annotations, the description provides a basic understanding. However, it lacks context like what log API requests are, and does not leverage the available space to improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning the schema lacks parameter descriptions. The tool description only mentions 'for a counter' but does not explain the counter_id parameter, its meaning, or acceptable values, leaving the agent without sufficient guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb 'List' and resource 'log API requests', and specifies it's for a counter, distinguishing it from sibling tools like ym_search or ym_execute.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool vs alternatives, no exclusions or prerequisites mentioned. The description only states what it does, not when it should be chosen.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_searchARead-only
Find available actions by intent. Optional domain filter: reporting, counters, goals, filters, grants, operations, segments, labels, accounts, delegates, annotations, access_filters, logs, uploads. Returns action ID, description, and JSON Schema of parameters.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| domain | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds behavioral context beyond the readOnlyHint annotation by detailing what the tool returns (action ID, description, JSON Schema) and mentioning the domain filter functionality. This clarifies the tool's behavior without repeating annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, using two sentences to cover purpose, optional filter, and output. It is front-loaded with the main action and avoids unnecessary details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has an output schema and only two parameters, the description provides sufficient context for selection and basic invocation. It could be slightly more explicit about the 'query' parameter format or behavior, but overall it is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by explaining the 'domain' parameter with a list of possible values, adding meaning beyond the schema's simple type and default. However, the 'query' parameter is not elaborated, leaving some ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states that the tool finds available actions by intent, which is a specific and distinct purpose. It lists possible domain filters and specifies the return values (action ID, description, JSON Schema). This clearly differentiates it from sibling tools like ym_execute or ym_labels.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description indicates when to use the tool (finding actions by intent) and mentions the optional domain filter, but does not explicitly state when not to use it or provide direct comparisons to alternatives. The context from sibling names implies its role, but explicit guidance is missing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_segmentsBRead-onlyIdempotent
List segments for a counter.
| Name | Required | Description | Default |
|---|---|---|---|
| counter_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate the tool is read-only and idempotent. The description adds no further behavioral details (e.g., pagination, ordering, or return structure), offering marginal added value.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence with no extraneous words. However, conciseness comes at the cost of missing potentially important details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one parameter and an output schema, the description is minimally adequate. It does not explain how to obtain a counter_id or how segments relate to other tools, which may be necessary for correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must explain the parameter, but it only implies that 'counter_id' identifies a counter. It does not clarify what a segment is or how to interpret the integer, leaving semantic gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (List) and the resource (segments for a counter). It is specific enough to understand the tool's purpose, though it does not explicitly differentiate from sibling tools like ym_counters.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like ym_search or ym_counters. The description lacks any contextual hints about prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_stat_dataBRead-onlyIdempotent
Table report (GET /stat/v1/data). ids and metrics are comma-separated. Example: ids='12345', metrics='ym:s:visits,ym:s:users', dimensions='ym:s:browser', date1='7daysAgo', date2='today'.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| sort | No | ||
| date1 | No | ||
| date2 | No | ||
| limit | No | ||
| offset | No | ||
| preset | No | ||
| filters | No | ||
| metrics | Yes | ||
| dimensions | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint, so the description adds limited value beyond indicating it's a GET request and that ids/metrics are comma-separated. No additional behavioral traits (e.g., rate limits, data scope) are disclosed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences plus an example with no verbosity. Every piece of information is useful and front-loaded, making it easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the presence of an output schema, the lack of return value explanation is acceptable. However, the description omits behavior for pagination (limit, offset), filtering, and sorting, which are essential for a table report tool with 10 parameters.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema coverage, the description must compensate but only explains formats for ids and metrics and provides an example with date1/date2 using special values. Parameters like sort, limit, offset, preset, filters, and dimensions are not explained, leaving significant gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description identifies the tool as a table report from a specific endpoint (GET /stat/v1/data) and provides an example. However, it does not explicitly differentiate from sibling tools like ym_stat_data_bytime or ym_search, which serve related but distinct purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. The example implies usage for retrieving statistical data, but there is no mention of exclusions or context where other tools might be more appropriate, such as ym_search for different data access patterns.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ym_stat_data_bytimeCRead-onlyIdempotent
Time-series report (GET /stat/v1/data/bytime). group: all/auto/minutes/hour/day/week/month/quarter/year.
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| date1 | No | ||
| date2 | No | ||
| group | No | day | |
| limit | No | ||
| metrics | Yes | ||
| dimensions | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and idempotentHint. Description adds the endpoint and group options, but lacks details on pagination, rate limits, or data freshness. It adds some context but not rich behavioral info.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short and to the point, but omits important details. It is efficiently written but at the expense of completeness.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 7 parameters with no schema descriptions and an output schema, the description is incomplete. It does not explain parameter formats or return values, leaving gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema has 0% description coverage. Description only explains the `group` parameter options. Other parameters like ids, date1, date2, limit, metrics, dimensions are undocumented. The description does not compensate for the lack of schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states it's a 'Time-series report' and mentions the endpoint, but doesn't specify what data it returns (e.g., Yandex Metrica statistics). It is not a tautology, but lacks specificity to distinguish from sibling ym_stat_data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like ym_stat_data. No prerequisites, exclusions, or context for use provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
12 tool updates
v0.2.4- First observed
ym_counter - First observed
ym_counters - First observed
ym_execute - First observed
ym_execute_file - First observed
ym_goals - First observed
ym_grants - First observed
ym_labels - First observed
ym_log_requests - First observed
ym_search - First observed
ym_segments - First observed
ym_stat_data - First observed
ym_stat_data_bytime
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose: search for actions, execute them, list specific resources (labels, counters, goals, etc.), and generate reports. There is no ambiguity between tools, and even similar report tools are differentiated by type.
All tools follow the 'ym_<resource_or_action>' pattern consistently. Names are descriptive and predictable, with only minor internal underscores (e.g., stat_data) which do not break the pattern.
12 tools is well-scoped for a Yandex Metrika server. It covers core resources (counters, goals, segments, etc.) and adds generic search/execute for extensibility without bloat.
The tool set covers all major Metrika operations with dedicated tools (counters, stats, goals, etc.) and provides a generic ym_execute for any remaining actions. This hybrid approach leaves no obvious gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Read-only Yandex Metrika MCP. Query visits, sources, geo, devices and more in plain language.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Google Ads MCP server — manage campaigns, keywords, and metrics.
MCP server for Russian books search, details, and recommendation candidates.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that provides access to Yandex Metrika analytics data through various tools and functions. This server allows AI assistants and applications to retrieve comprehensive analytics data from Yandex Metrika accounts.1-
- AlicenseCqualityDmaintenanceMCP server for Yandex Metrika analytics, enabling AI assistants to access traffic, content, demographics, conversion, e-commerce, and drill-down reports.312MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Yandex Direct, Metrika, Wordstat, and Webmaster APIs, providing 132 tools to manage advertising campaigns, analytics, keyword research, and reporting through any MCP-compatible client.59MIT
- AlicenseAqualityAmaintenanceMCP server for Yandex Metrica analytics: query web analytics metrics, goals, conversions, and raw API data using natural language from AI clients like Claude and Cursor.81131MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/dontsovcmc/mcp-server-yandex-metrika'
If you have feedback or need assistance with the MCP directory API, please join our Discord server