Skip to main content
Glama
dontsovcmc

io.github.dontsovcmc/yandex-metrika

by dontsovcmc

mcp-server-yandex-metrika

Version

MCP-сервер, CLI-утилита и библиотека Pydantic-моделей для API Яндекс Метрики.

  • MCP-сервер — интеграция с Claude Code, Claude Desktop и другими MCP-клиентами

  • CLI-утилита — работа с API из терминала, скрипты и автоматизация

  • Pydantic-модели — типизированные модели API для использования в своих Python-программах

Все данные остаются на вашем компьютере — токен никуда не передаётся.

Оглавление

Related MCP server: ya-metrics-mcp

Возможности

Отчёты (Reporting API)

Инструмент

CLI

Описание

ym_stat_data

stat-data

Табличный отчёт по метрикам и измерениям

ym_stat_data_bytime

stat-bytime

Отчёт по времени (группировка: час/день/неделя/месяц)

ym_stat_data_drilldown

stat-drilldown

Drill down отчёт с раскрытием уровней

ym_stat_data_comparison

stat-comparison

Сравнение сегментов/периодов

ym_stat_data_comparison_drilldown

Сравнение с drill down

Счётчики

Инструмент

CLI

Описание

ym_counters

counters

Список счётчиков (поиск, фильтрация)

ym_counter

counter

Информация о счётчике

ym_counter_create

counter-create

Создать счётчик

ym_counter_update

counter-update

Изменить счётчик

ym_counter_delete

counter-delete

Удалить счётчик

ym_counter_undelete

counter-undelete

Восстановить удалённый

Цели

Инструмент

CLI

Описание

ym_goals

goals

Список целей счётчика

ym_goal

goal

Информация о цели

ym_goal_create

goal-create

Создать цель (url/number/step/action/...)

ym_goal_update

Изменить цель

ym_goal_delete

goal-delete

Удалить цель

Фильтры

Инструмент

CLI

Описание

ym_filters

filters

Список фильтров

ym_filter

Информация о фильтре

ym_filter_create

filter-create

Создать фильтр (IP, URL, реферер)

ym_filter_update

Изменить фильтр

ym_filter_delete

filter-delete

Удалить фильтр

Доступ (Grants)

Инструмент

CLI

Описание

ym_grants

grants

Список разрешений

ym_grant_create

grant-create

Выдать разрешение

ym_grant_update

Изменить разрешение

ym_grant_delete

grant-delete

Удалить разрешение

Операции

Инструмент

CLI

Описание

ym_operations

operations

Список операций

ym_operation

Информация об операции

ym_operation_create

operation-create

Создать операцию (cut_parameter, to_lower, ...)

ym_operation_update

Изменить операцию

ym_operation_delete

operation-delete

Удалить операцию

Сегменты

Инструмент

CLI

Описание

ym_segments

segments

Список сегментов

ym_segment

Информация о сегменте

ym_segment_create

segment-create

Создать сегмент

ym_segment_update

Изменить сегмент

ym_segment_delete

segment-delete

Удалить сегмент

Метки

Инструмент

CLI

Описание

ym_labels

labels

Список меток

ym_label_create

label-create

Создать метку

ym_label_update

Изменить метку

ym_label_delete

label-delete

Удалить метку

ym_counter_label_set

Привязать метку к счётчику

ym_counter_label_unset

Отвязать метку

Аккаунты и представители

Инструмент

CLI

Описание

ym_accounts

accounts

Список аккаунтов

ym_account_delete

Удалить аккаунт

ym_delegates

delegates

Список представителей

ym_delegate_add

delegate-add

Добавить представителя

ym_delegate_delete

delegate-delete

Удалить представителя

Примечания на графике

Инструмент

CLI

Описание

ym_chart_annotations

chart-annotations

Список примечаний

ym_chart_annotation_create

chart-annotation-create

Создать примечание

ym_chart_annotation_update

Изменить примечание

ym_chart_annotation_delete

Удалить примечание

Фильтры доступа

Инструмент

CLI

Описание

ym_access_filters

Список фильтров доступа

ym_access_filter_create

Создать фильтр доступа

ym_access_filter_update

Изменить фильтр доступа

ym_access_filter_delete

Удалить фильтр доступа

Logs API

Инструмент

CLI

Описание

ym_log_requests

log-requests

Список запросов логов

ym_log_request

Информация о запросе

ym_log_request_create

log-request-create

Создать запрос (hits/visits)

ym_log_request_evaluate

log-request-evaluate

Оценить возможность запроса

ym_log_request_clean

Очистить обработанные логи

ym_log_request_cancel

Отменить запрос

ym_log_request_download

log-download

Скачать часть лога (TSV)

Импорт данных

Инструмент

CLI

Описание

ym_offline_conversions_upload

upload-conversions

Загрузить оффлайн-конверсии

ym_offline_conversions_uploads

Список загрузок конверсий

ym_offline_conversion_upload_info

Инфо о загрузке

ym_calls_upload

upload-calls

Загрузить звонки

ym_calls_uploads

Список загрузок звонков

ym_calls_upload_info

Инфо о загрузке звонков

ym_expenses_upload

upload-expenses

Загрузить расходы

ym_user_params_upload

Загрузить параметры пользователей


MCP-сервер

Установка

Шаг 1. Получить OAuth-токен Яндекс Метрики

  1. Зарегистрируйте приложение на oauth.yandex.com

  2. Укажите права: metrika:read, metrika:write

  3. Получите токен: 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/settings.json (секция mcpServers)

Claude Desktop

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Claude Desktop

Windows

%APPDATA%\Claude\claude_desktop_config.json

Claude Desktop

Linux

~/.config/Claude/claude_desktop_config.json

Через 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 visits

Pydantic-модели

Пакет содержит типизированные 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


Переменные окружения

Переменная

Обязательная

По умолчанию

Описание

YANDEX_METRIKA_TOKEN

да

OAuth-токен Яндекс Метрики

METRIKA_TIMEOUT

нет

30

Таймаут HTTP-запросов к API (секунды)

METRIKA_FILE_TIMEOUT

нет

60

Таймаут скачивания файлов (секунды)

Загрузка из файла

Вместо передачи переменных через -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 tools
ym_counterC
Read-onlyIdempotent

Get counter details. field: goals,mirrors,grants,filters,operation.

ParametersJSON Schema
NameRequiredDescriptionDefault
fieldNo
counter_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior3/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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_countersB
Read-onlyIdempotent

List counters. Optional filters: search_string, permission (own/view/edit), status (Active/Deleted), per_page, offset.

ParametersJSON Schema
NameRequiredDescriptionDefault
offsetNo
statusNo
per_pageNo
permissionNo
search_stringNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYes
params_jsonNo{}

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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).

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYes
file_pathYes
params_jsonNo{}

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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_goalsB
Read-onlyIdempotent

List goals for a counter.

ParametersJSON Schema
NameRequiredDescriptionDefault
counter_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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_grantsC
Read-onlyIdempotent

List access grants for a counter.

ParametersJSON Schema
NameRequiredDescriptionDefault
counter_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters1/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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_labelsA
Read-onlyIdempotent

List all labels.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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_requestsB
Read-onlyIdempotent

List log API requests for a counter.

ParametersJSON Schema
NameRequiredDescriptionDefault
counter_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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_segmentsB
Read-onlyIdempotent

List segments for a counter.

ParametersJSON Schema
NameRequiredDescriptionDefault
counter_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3/5.0
Behavior3/5

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.

Conciseness4/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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_dataB
Read-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'.

ParametersJSON Schema
NameRequiredDescriptionDefault
idsYes
sortNo
date1No
date2No
limitNo
offsetNo
presetNo
filtersNo
metricsYes
dimensionsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters2/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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_bytimeC
Read-onlyIdempotent

Time-series report (GET /stat/v1/data/bytime). group: all/auto/minutes/hour/day/week/month/quarter/year.

ParametersJSON Schema
NameRequiredDescriptionDefault
idsYes
date1No
date2No
groupNoday
limitNo
metricsYes
dimensionsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.6/5.0
Behavior3/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters2/5

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.

Purpose3/5

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.

Usage Guidelines2/5

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.

  1. 12 tool updatesv0.2.4
    • First observedym_counter
    • First observedym_counters
    • First observedym_execute
    • First observedym_execute_file
    • First observedym_goals
    • First observedym_grants
    • First observedym_labels
    • First observedym_log_requests
    • First observedym_search
    • First observedym_segments
    • First observedym_stat_data
    • First observedym_stat_data_bytime

TDQS

A3.6/5.0

Scored across 12 tools

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    A 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
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP 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.
    59
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP 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.
    8
    113
    1
    MIT

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/dontsovcmc/mcp-server-yandex-metrika'

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