Skip to main content
Glama
Yandex Direct MCP

Yandex Direct MCP

Обновить кампанию

update_campaign
Idempotent

Update a Yandex Direct campaign's name, end date, or negative keyword list without changing its budget. Use it to revise campaign settings while keeping strategy and weekly spend limits unchanged.

Instructions

Обновляет название, дату окончания и/или минус-фразы кампании (campaigns/update). Бюджет здесь не меняется: у Директа он недельный и является частью стратегии — set_campaign_strategy (WeeklySpendLimit в структуре параметров автостратегии; у ручных ставок — HighestPosition: {WeeklySpendLimit}, только у ЕПК). Запрос идёт в API v501, в песочнице — в v5.

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": {
      "id": "<id>"
    },
    "name": "update_campaign"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId кампании, которую нужно обновить.
nameNoНовое название кампании.
endDateNoНовая дата окончания в формате YYYY-MM-DD.
client_loginNoЛогин клиента агентства или кабинета в управлении (из list_clients). Если не указан — YANDEX_DIRECT_LOGIN из конфигурации, а без него собственный аккаунт токена.
dailyBudgetModeNoУстарело: дневного бюджета в Директе больше нет (с 30.11.2026) — вызов с этим параметром отклоняется. Менять бюджет — set_campaign_strategy (WeeklySpendLimit в структуре параметров автостратегии; у ручных ставок — HighestPosition: {WeeklySpendLimit}, только у ЕПК).
negativeKeywordsNoЗаменяет минус-фразы кампании; пустой массив очищает их. Чтобы дописать или убрать отдельные фразы, не затирая список, — update_negative_keywords.
dailyBudgetAmountNoУстарело: дневного бюджета в Директе больше нет (с 30.11.2026) — вызов с этим параметром отклоняется. Менять бюджет — set_campaign_strategy (WeeklySpendLimit в структуре параметров автостратегии; у ручных ставок — HighestPosition: {WeeklySpendLimit}, только у ЕПК).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.13.1
    • changedInput schema / properties / dailyBudgetAmount / description
      Previous value: -"Дневной бюджет в валюте аккаунта."New value: +"Устарело: дневного бюджета в Директе больше нет (с 30.11.2026) — вызов с этим параметром отклоняется. Менять бюджет — set_campaign_strategy (WeeklySpendLimit в структуре параметров автостратегии; у ручных ставок — HighestPosition: {WeeklySpendLimit}, только у ЕПК)."
    • removedInput schema / properties / dailyBudgetAmount / exclusiveMinimum
      Removed value: -0
    • changedInput schema / properties / dailyBudgetMode / description
      Previous value: -"Режим траты дневного бюджета: STANDARD — показы как можно быстрее, DISTRIBUTED — равномерно в течение дня. Если не задан, сохраняется текущий режим кампании."New value: +"Устарело: дневного бюджета в Директе больше нет (с 30.11.2026) — вызов с этим параметром отклоняется. Менять бюджет — set_campaign_strategy (WeeklySpendLimit в структуре параметров автостратегии; у ручных ставок — HighestPosition: {WeeklySpendLimit}, только у ЕПК)."
  2. Changed1 schema field changedv1.12.1
    • changedInput schema / properties / negativeKeywords / description
      Previous value: -"Заменяет минус-фразы кампании; пустой массив очищает их."New value: +"Заменяет минус-фразы кампании; пустой массив очищает их. Чтобы дописать или убрать отдельные фразы, не затирая список, — update_negative_keywords."
  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. Changed6 schema fields changedv1.5.1
    • changedInput schema / properties / dailyBudgetAmount / description
      Previous value: -"Daily budget in account currency units."New value: +"Дневной бюджет в валюте аккаунта."
    • addedInput schema / properties / dailyBudgetMode / description
      Added value: +"Режим траты дневного бюджета: STANDARD — показы как можно быстрее, DISTRIBUTED — равномерно в течение дня. Если не задан, сохраняется текущий режим кампании."
    • changedInput schema / properties / endDate / description
      Previous value: -"New end date, format YYYY-MM-DD."New value: +"Новая дата окончания в формате YYYY-MM-DD."
    • changedInput schema / properties / id / description
      Previous value: -"Campaign id to update."New value: +"Id кампании, которую нужно обновить."
    • changedInput schema / properties / name / description
      Previous value: -"New campaign name."New value: +"Новое название кампании."
    • changedInput schema / properties / negativeKeywords / description
      Previous value: -"Replace the campaign's negative keywords; pass an empty array to clear them."New value: +"Заменяет минус-фразы кампании; пустой массив очищает их."
  5. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare idempotent, non-destructive, non-read-only, open-world behavior, so the bar is lower. The description adds real context the annotations cannot: the API version (v501, v5 in sandbox) and the fact that budget is structurally managed elsewhere. It does not restate replacement semantics or error behavior, which remain in the schema.

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-loads the scope in the first clause, then the budget exclusion. The strategy-parenthetical detail (WeeklySpendLimit, HighestPosition, ЕПК) is dense but earns its place by redirecting a likely mistake; the API-version sentence is useful but slightly tacked on.

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 7-parameter mutation tool with full schema coverage and no output schema, the definition covers scope, deprecation, and the main cross-tool dependency. What remains missing (return shape, behavior on invalid ids) is minor given the schema richness and annotations.

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 100%, so the schema already documents every parameter including the deprecated dailyBudget* fields and the list-replacement behavior of negativeKeywords. The description only adds the field enumeration and the budget routing pointer, which is marginal value over structured data — baseline 3.

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?

States a specific verb and resource plus the exact mutable fields (name, end date, negative keywords) and the underlying endpoint (campaigns/update). It also explicitly carves budget out of scope and names set_campaign_strategy as where that lives, so the agent can separate it from the sibling without opening a schema.

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?

Clear positive context (field-level updates) and one explicit exclusion with the correct alternative for budget changes. It does not mention the alternative for incremental negative-keyword edits (update_negative_keywords), which is only documented in the schema, so routing guidance is good but not exhaustive.

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