Skip to main content
Glama
yandex-direct-mcp-plus

yandex-direct-mcp-plus

by Pavelsiba

Минус-фразы группы

set_ad_group_negative_keywords
Destructive

Set, append, or remove negative keywords for a Yandex.Direct ad group. Choose replace to overwrite the full list, add to extend it, or remove to delete specified phrases.

Instructions

Минус-фразы на уровне группы объявлений. Режим mode обязателен: replace заменяет список целиком (прежние фразы теряются, пустой массив очищает), add дописывает к текущим, remove убирает названные — читать список перед этим не нужно, add и remove делают это сами. Чтобы добавить фразу к существующим, нужен add: replace с одной фразой сотрёт остальные.

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": {
      "ad_group_id": "<ad_group_id>",
      "negative_keywords": "<negative_keywords>",
      "mode": "<mode>"
    },
    "name": "set_ad_group_negative_keywords"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesОбязателен. replace — заменить список целиком (пустой массив очищает, прежние фразы теряются), add — дописать к текущим, remove — убрать перечисленные. add и remove сначала читают текущий список, это дополнительный вызов API. Фразы сравниваются так же, как их сравнивает Директ: без учёта регистра, буквы ё и е равны, краевые и повторные пробелы не учитываются, операторы закрепления ! и + игнорируются
ad_group_idYesID группы объявлений
negative_keywordsYesМинус-фразы группы: при mode=replace — полный новый список взамен прежнего, при add — что дописать, при remove — что убрать

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.1.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / dry_run
      Removed value: -{
      -  "description": "true — ничего не менять: проверить параметры и вернуть тела запросов, которые ушли бы в Директ. Чтение при этом выполняется.",
      -  "type": "boolean"
      -}
  2. Changed1 schema field changedv1.7.0
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "description": "true — ничего не менять: проверить параметры и вернуть тела запросов, которые ушли бы в Директ. Чтение при этом выполняется.",
      +  "type": "boolean"
      +}
  3. First observedv1.6.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the agent knows this mutates and can destroy data. The description reinforces this concretely: replace loses previous phrases and an empty array clears the list. Credit for the operational detail about extra API calls in add/remove mode, but return shape and error behavior remain unstated.

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?

Front-loaded with the resource and the mandatory mode, then the mode behaviors in priority order. Dense but every sentence carries information; the closing sentence on replace-vs-add slightly restates the mode explanation but serves as a safety warning.

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?

A destructive mutation tool with full annotation coverage and a fully described schema; the description supplies the destructive consequences and the mode workflow, which is what an agent needs to call it safely. Nothing critical is missing, though the absence of an output schema means the result of add/remove is not described.

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% and the mode enum already documents replace/add/remove semantics and phrase comparison rules, so the baseline is 3. The description adds one piece of guidance not present in the schema — that add/remove fetch the current list themselves, so no read-first step is needed — which is genuine added meaning.

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?

States the resource precisely (negative keywords at ad-group level) and the verb is carried by the name 'set'. The phrase 'на уровне группы объявлений' implicitly separates it from set_campaign_negative_keywords, though that sibling is never named 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?

Explicitly explains each mode: replace overwrites (and a single-phrase replace erases the rest), add appends, remove deletes. It even pre-empts the common mistake of using replace instead of add, and notes that add/remove read the current list themselves so no prior read is required.

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