Skip to main content
Glama
conarti

yandex-messenger-mcp

by conarti

Edit message

edit_message
Destructive

Edit your own message in Yandex Messenger: preview the change as 'was -> will be' without applying it, then confirm with a token to make the irreversible edit.

Instructions

Правка своего сообщения в два шага: без confirm возвращает превью «было -> станет» (draft) и НЕ правит; с confirm:true и confirm_token из превью правит. Правка необратима, поэтому чат, message_id, new_text и состав mentions на шаге confirm сверяются с подтверждёнными; расхождение отклоняется. Правку чужого сообщения отклоняет сервер. После правки сообщение читается с новым текстом и непустым LastEditTimestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chatYesChatId либо поисковый запрос для резолва чата
confirmNofalse/отсутствует - вернуть draft-превью; true - применить правку (необратимо)
mentionsNoНОВЫЙ ПОЛНЫЙ состав упоминаний. БЕЗ этого поля упоминания правимого сообщения переотправляются как есть; с ним старый состав не подмешивается, а пустой массив стирает упоминания. На DRAFT - запросы: @Имя, @<guid> или голый guid; резолвятся по каталогу организации (неоднозначность отклоняет правку). На CONFIRM предъявляются РОВНО те guid, что вернул draft, в том же порядке: изменение состава/порядка отклонит правку
new_textYesНовый текст сообщения. На шаге draft названные в mentions строки заменяются в тексте на токены @<guid>; на confirm верните draft.will_text эхом без изменений
message_idYesTimestamp правимого сообщения в микросекундах (строка)
confirm_tokenNoТокен из draft-превью. Обязателен при confirm:true

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.0
    • addedInput schema / properties / mentions
      Added value: +{
      +  "description": "НОВЫЙ ПОЛНЫЙ состав упоминаний. БЕЗ этого поля упоминания правимого сообщения переотправляются как есть; с ним старый состав не подмешивается, а пустой массив стирает упоминания. На DRAFT - запросы: @Имя, @<guid> или голый guid; резолвятся по каталогу организации (неоднозначность отклоняет правку). На CONFIRM предъявляются РОВНО те guid, что вернул draft, в том же порядке: изменение состава/порядка отклонит правку",
      +  "items": {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / new_text / description
      Previous value: -"Новый текст сообщения"New value: +"Новый текст сообщения. На шаге draft названные в mentions строки заменяются в тексте на токены @<guid>; на confirm верните draft.will_text эхом без изменений"
  2. First observedv0.2.1

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say destructiveHint=true, but the description discloses far more: the draft step is non-mutating, the confirm step is irreversible, chat/message_id/new_text/mentions are cross-validated at confirm and discrepancies rejected, foreign-message edits are server-rejected, and the edited message reads back with a non-empty LastEditTimestamp. This meaningfully extends what the annotations already provide, and there is no contradiction with destructiveHint=true.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences arranged as cause-and-effect: draft behavior, confirm behavior with irreversibility and validation, then post-edit state. It is front-loaded with the most critical fact (two-step process, draft does not edit), and every clause earns its place — nothing repeats the schema or annotations.

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 complex six-parameter tool with no output schema, the description covers the whole call sequence, irreversibility, mismatch rejection, the own-message restriction, and the observable post-edit state (new text plus LastEditTimestamp). Small gaps remain: the confirm step's return value and error shapes are not described, and the draft preview's exact structure is only partially sketched — though the schema's detailed parameter documentation partially compensates.

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%, and the schema descriptions are already unusually rich — mentions documents the draft/confirm resolution and ordering rules, confirm explains the boolean switch, and confirm_token ties to the draft. The description contributes flow-level context (draft first, then confirm with token) but adds no parameter-specific meaning beyond the schema, so the baseline of 3 applies.

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+resource+scope constraint: 'Правка своего сообщения' (editing one's own message), and immediately explains the two-step draft/confirm mechanism. This distinguishes it from sibling tools like send_message, delete_message, and pin_message without needing to open their schemas.

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?

The usage context is explicit: a mandatory two-step sequence where 'без confirm возвращает превью ... и НЕ правит' but 'с confirm:true и confirm_token из превью правит'. It also states an exclusion — 'Правку чужого сообщения отклоняет сервер' — signaling not to use it on messages the agent didn't author. It falls short of explicitly naming alternatives (e.g., send_message for new messages), so it earns a 4 rather than a 5.

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