Skip to main content
Glama
Yandex Direct MCP

Yandex Direct MCP

Прямой вызов API Яндекс Директа

raw_request
Destructive

Call any Yandex Direct API service or method directly, including ones without a dedicated tool. Read methods run freely; write methods require confirmWrite=true.

Instructions

Универсальный запрос: вызывает напрямую любой сервис или метод API Яндекс Директа (например service "bidmodifiers", method "get"). Нужен для сервисов, у которых нет отдельного инструмента. Деньги — в микроединицах (без конвертации). Методы чтения (get/has/check) выполняются свободно; любой другой метод считается записью и требует confirmWrite=true. Версия API по умолчанию — v5, а для сервисов campaigns и adgroups — v501: только она называет Единую перформанс-кампанию и её группы настоящими типами (UNIFIED_CAMPAIGN, UNIFIED_AD_GROUP) и фильтрует по ним, v5 выдаёт их за TEXT_CAMPAIGN и TEXT_AD_GROUP. Параметр apiVersion задаёт версию явно для любого сервиса.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "service": "<service>",
      "method": "<method>"
    },
    "name": "raw_request"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodYesМетод API, например get, add, update, delete, set, toggle, checkCampaigns.
paramsNoОбъект params для метода — как есть.
serviceYesПуть сервиса строчными буквами, например campaigns, bidmodifiers, sitelinks, adextensions, changes, keywordsresearch.
apiVersionNoВерсия API для этого запроса. Если не указана — v5, а для campaigns и adgroups — v501. В песочнице доступна только v5.
client_loginNoЛогин клиента агентства или кабинета в управлении (из list_clients). Если не указан — YANDEX_DIRECT_LOGIN из конфигурации, а без него собственный аккаунт токена.
confirmWriteNoДолжен быть true для запуска метода записи (всё, кроме get/has/check).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.14.0
    • addedInput schema / properties / apiVersion
      Added value: +{
      +  "description": "Версия API для этого запроса. Если не указана — v5, а для campaigns и adgroups — v501. В песочнице доступна только v5.",
      +  "enum": [
      +    "v5",
      +    "v501"
      +  ],
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.11.0
    • changedInput schema / properties / service / description
      Previous value: -"Путь сервиса строчными буквами, например campaigns, bidmodifiers, sitelinks, vcards, changes, keywordsresearch."New value: +"Путь сервиса строчными буквами, например campaigns, bidmodifiers, sitelinks, adextensions, changes, keywordsresearch."
  3. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / client_login
      Added value: +{
      +  "description": "Логин клиента агентства или кабинета в управлении (из list_clients). Если не указан — YANDEX_DIRECT_LOGIN из конфигурации, а без него собственный аккаунт токена.",
      +  "pattern": "^[A-Za-z0-9][A-Za-z0-9._@-]{0,99}$",
      +  "type": "string"
      +}
  4. Changed4 schema fields changedv1.5.1
    • changedInput schema / properties / confirmWrite / description
      Previous value: -"Must be true to run a write method (anything other than get/has/check)."New value: +"Должен быть true для запуска метода записи (всё, кроме get/has/check)."
    • changedInput schema / properties / method / description
      Previous value: -"API method, e.g. get, add, update, delete, set, toggle, checkCampaigns."New value: +"Метод API, например get, add, update, delete, set, toggle, checkCampaigns."
    • changedInput schema / properties / params / description
      Previous value: -"Raw params object for the method."New value: +"Объект params для метода — как есть."
    • changedInput schema / properties / service / description
      Previous value: -"Lowercase service path, e.g. campaigns, bidmodifiers, sitelinks, vcards, changes, keywordsresearch."New value: +"Путь сервиса строчными буквами, например campaigns, bidmodifiers, sitelinks, vcards, changes, keywordsresearch."
  5. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and openWorldHint=true, and the description goes further by naming the confirmWrite gate, the micro-unit money convention (no conversion), the default version logic, and the sandbox limitation. The v501/v5 distinction for campaigns and adgroups is genuinely valuable behavioral context, since the chosen version silently changes the returned type names. It stops short of saying what the response envelope looks like or how errors surface on a rejected write, which keeps it off a 5.

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?

Purpose and the read/write gate are front-loaded, and each subsequent sentence carries a distinct operational fact. It is dense but not padded; the only mild redundancy is the apiVersion note that partially restates the schema's default-version description, plus a closing sentence whose content already appeared earlier.

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?

For a generic passthrough tool with no output schema, the description covers the traps an agent would otherwise hit: units, version defaults, the write confirmation gate, and login fallback behavior. What is missing is any statement about the shape of the returned data or how failures/partial errors come back, which matters for an open-world escape-hatch tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning on top of the schema: it explains why apiVersion matters (v501 reports UNIFIED_CAMPAIGN/UNIFIED_AD_GROUP and filters by them, v5 mislabels them as TEXT_*), which the enum alone does not convey. It also ties confirmWrite to the read/write split, giving the flag a semantics beyond its one-line schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb-plus-resource statement: it calls any service or method of the Yandex Direct API directly, and gives a concrete example (service "bidmodifiers", method "get"). It also distinguishes itself from siblings by stating it exists for services that lack a dedicated tool, which is exactly the routing signal an agent needs against the many named siblings.

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?

It says when to use it (services without a dedicated tool) and encodes an explicit use/avoid decision rule: read methods (get/has/check) run freely, everything else counts as a write and requires confirmWrite=true. It also states the version-selection rule and when to override it, so the agent knows the alternatives and the conditions that select them.

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