Skip to main content
Glama
Yandex Direct MCP

Yandex Direct MCP

Изменить запрещённые площадки

update_excluded_sites
Destructive

Add, remove, replace, or clear excluded sites for a Yandex Direct campaign to control where ads do not appear in ad networks, including domains, mobile apps, and external networks.

Instructions

Меняет список площадок, где кампании запрещено показываться (ExcludedSites): сайты, мобильные приложения и внешние сети РСЯ. Действует только в сетях, на поиске площадки не запрещаются. API хранит список целиком и при записи заменяет его, поэтому действие задаётся явно:

  • add — дописать площадки к текущим. Инструмент читает текущий список (campaigns/get) и записывает объединённый (campaigns/update): два вызова API. Уже исключённые не дублируются.

  • remove — вернуть показы на указанных площадках. Тоже чтение + запись.

  • replace — записать ровно переданный список вместо текущего, без чтения. Пустой список здесь не принимается — для очистки есть clear.

  • clear — снять все запреты (отправляется null). Значения: домен без протокола (example.com — API сам уберёт www. и приведёт к нижнему регистру), id приложения Android/iOS в виде com.example.app (числовой id App Store вида id123456789 API отвергает), название внешней сети из get_dictionaries → SupplySidePlatforms (например BidSwitch). Значение площадки из отчёта get_statistics (поле Placement, строки с AdNetworkType=AD_NETWORK) передаётся как есть. Если add/remove ничего не меняют, записи нет (changed: false). Ответ: before/after — число площадок до и после, added/alreadyPresent или removed/notFound. Между чтением и записью нет блокировки: правка того же списка в интерфейсе в эту секунду будет перезаписана. Лимиты API: до 1000 площадок, до 255 символов в каждой. Текущий список — list_campaigns с fieldNames ["ExcludedSites"].

Input Schema

NameRequiredDescriptionDefault
sitesNoПлощадки: домены, id приложений, названия внешних сетей. Не передаётся для clear.
actionYesadd, remove, replace или clear — см. описание инструмента.
campaignIdYesId кампании.
client_loginNoЛогин клиента агентства или кабинета в управлении (из list_clients). Если не указан — YANDEX_DIRECT_LOGIN из конфигурации, а без него собственный аккаунт токена.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.12.1

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations (destructiveHint=true, idempotentHint=false), the description discloses that add/remove perform two API calls (read then write), that no lock exists so a concurrent UI edit can be overwritten, that an unchanged add/remove produces no write (changed: false), that clear sends null, and the API limits of 1000 sites / 255 chars each. That is exactly the behavioral context an agent cannot infer from structured fields.

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 scoping come first, then a well-structured bulleted action list, then value formats, side effects and limits — a logical front-to-back order with no filler sentences. It is long and clause-dense, but the length is driven by four distinct actions plus format rules, so almost every sentence earns its place.

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?

There is no output schema, and the description compensates by documenting the response shape (before/after counts, added/alreadyPresent or removed/notFound). Combined with the action semantics, concurrency warning and size limits, nothing needed to invoke this destructive mutation correctly is missing.

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

Parameters5/5

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

Schema coverage is 100%, so the baseline would be 3, but the description substantially enriches the schema: it explains the accepted value formats (domain without protocol, www stripped and lowercased by the API, app ids as com.example.app with numeric App Store ids rejected, external network names from get_dictionaries), and that sites must be omitted for clear and must be non-empty for replace.

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 first sentence names a specific verb+resource (изменяет список ExcludedSites) and immediately scopes it: sites, mobile apps and external networks, network-only (search placements cannot be excluded). It is clearly distinguishable from sibling tools like update_negative_keywords because the resource and effect on impressions are stated explicitly.

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?

Each of the four actions is given an explicit when-to-use contract: add appends, remove restores impressions, replace overwrites without reading, clear is the only route to an empty list. It also routes the agent to supporting tooling (list_campaigns with fieldNames ["ExcludedSites"] to read state, get_dictionaries for SupplySidePlatforms, get_statistics Placement field for report-derived values).

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