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

yandex-direct-mcp-plus

by Pavelsiba

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

set_campaign_negative_keywords
Destructive

Set campaign-level negative keywords by replacing, adding, or removing phrases to block unwanted Yandex.Direct search queries without overwriting existing lists.

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

Input Schema

NameRequiredDescriptionDefault
modeYesОбязателен. replace — заменить список целиком (пустой массив очищает, прежние фразы теряются), add — дописать к текущим, remove — убрать перечисленные. add и remove сначала читают текущий список, это дополнительный вызов API. Фразы сравниваются так же, как их сравнивает Директ: без учёта регистра, буквы ё и е равны, краевые и повторные пробелы не учитываются, операторы закрепления ! и + игнорируются
campaign_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

A3.9/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 safety profile is known. The description still earns credit by stating the concrete destruction (prior phrases are lost, an empty array clears the list) and that add/remove trigger an extra read API call. However, much of that material is duplicated verbatim in the mode parameter's schema description, so the net addition beyond structured data is modest.

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 operative content is front-loaded into the second and third sentences and every clause carries weight — mode requirement, destruction warning, no-pre-read note, and the replace-vs-add caveat. The opening sentence is a bare nominal phrase that largely repeats the title and could be merged away, a small structural waste.

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 three-parameter destructive mutation with no output schema, the description covers the required-mode constraint, per-mode effects, data loss, and the internal read behavior of add/remove. What is missing is any statement of what the call returns after a successful write (the resulting list?), though with annotations and a fully described schema this is a minor gap.

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 description coverage is 100%, so the schema already documents all three parameters and the mode enum in detail. The description reinforces mode semantics but adds nothing about campaign_id or the negative_keywords items beyond what the schema states. Baseline 3 is the correct ceiling here.

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 first sentence names the resource and its scope ("Минус-фразы на уровне кампании"), and the mode discussion makes clear this writes a campaign-level keyword list. The level qualifier implicitly distinguishes it from set_ad_group_negative_keywords and get_campaign_negative_keywords, though no sibling is named explicitly. The opening line is close to a restatement of the tool title, which keeps it from a 5.

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 spells out exactly what each mode means and when to pick it, including the explicit trap: to append to an existing list you must use add, because replace with a single phrase will erase the rest. It also tells the agent it does not need to read the list first, since add/remove fetch it internally. That is when-to-use, when-not, and an alternative in one paragraph.

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