Skip to main content
Glama
1C OData MCP

1C OData MCP

Скопировать документ

write.document.copy_document

Copies an existing document to create a new unposted one with all details, ideal for recurring monthly documents. Adjust date, header fields, or line items before saving.

Instructions

Создаёт новый документ по образцу существующего: читает его целиком и записывает копию со ВСЕМИ реквизитами — содержание строк, счета учёта, банковский счёт, ответственный, адрес доставки, доп. условия. Это главный способ выставить ежемесячно повторяющийся документ: инструменты create_* собирают документ из полей схемы и всё остальное теряют. Копия создаётся НЕПРОВЕДЁННОЙ, с новым номером (1С нумерует сама) и датой (по умолчанию — момент предпросмотра). Правки: date — дата; fields — реквизиты шапки техническими именами (как в update_entity); lines — правки строк по номеру (напр. количество и содержание). Сумма документа пересчитывается по строкам, если не задана явно в fields. Счета расчётов — как в исходном документе; если в fields сменён договор — по настройке нового договора. Posted, DeletionMark, Ref_Key и DataVersion в fields не задаются: копия всегда непроведённая, со своей ссылкой. По умолчанию dry-run; запись — при confirm=true.

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": {
      "entitySet": "<entitySet>",
      "ref": "<ref>"
    },
    "name": "write.document.copy_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesRef_Key документа-образца (GUID)
dateNoДата копии YYYY-MM-DD (по умолчанию — момент предпросмотра)
linesNoПравки строк табличной части по номеру (остальные строки копируются как есть)
fieldsNoРеквизиты шапки, которые надо изменить: { техническоеИмя: значение }, напр. {"Комментарий":"..."}
confirmNofalse (по умолчанию) — только предпросмотр (dry-run), запись НЕ выполняется. true — выполнить создание. Сначала всегда показывайте dry-run и получайте согласие пользователя; при подтверждении передавайте operationId из результата предпросмотра и те же аргументы. После таймаута повторяйте подтверждение с тем же id, не создавая новый предпросмотр.
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
entitySetYesИмя документа, напр. Document_СчетНаОплатуПокупателю
operationIdNoUUID из предпросмотра. Передайте его при confirm=true, чтобы повтор не создал дубликат.
responsibleRefNoОтветственный документа — Ref_Key пользователя 1С (read.catalog.list_users): ставится в «Ответственный» или, где его нет (продажи и закупки УТ), в «Менеджер». Помеченный, недействительный и служебный — отказ; у документов без обоих полей (ПКО, РКО и заявка на расходование УТ) — отказ. Заменяет ответственного из fields

Output Schema

NameRequiredDescriptionDefault
refNo
codeNo
noteNo
notesNo
dryRunNo
createdNo
payloadNo
retriedNo
warningNo
databaseNo
replayedNo
entitySetNo
reconciledNo
willCreateNo
descriptionNo
operationIdNo
deletionMarkNo
writableBaseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnly=false and destructive=false; the description goes well beyond by stating the copy is always unposted, gets a new number assigned by 1С, defaults its date to the preview moment, recalculates the total from lines unless overridden, inherits settlement accounts, and forbids setting Posted/DeletionMark/Ref_Key/DataVersion. The one thing not addressed is what an existing duplicate/retry looks like beyond operationId, but the idempotency hint in the schema covers that.

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 purpose and sibling differentiation before behavior and parameter notes, and nearly every sentence carries unique constraints. It is a single dense block with a small amount of redundancy, since the dry-run/confirm workflow is restated almost verbatim from the confirm parameter's schema description.

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?

For a 9-parameter, nested-object write tool with an output schema, the description covers what is created, what is preserved, what is forbidden, how totals and accounts resolve, and the safe preview-then-confirm flow. Nothing an agent needs to invoke it correctly is missing, and return values are rightly left to the output schema.

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 date, fields, lines, confirm, database, operationId and responsibleRef in detail. The description adds cross-parameter rules not present in the schema — amount recalculation from lines, settlement-account inheritance unless the contract changes in fields, and the excluded header keys. That is real added meaning, but it is stated compactly and much of the parameter detail is duplicated rather than extended, keeping it near baseline.

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 ("Создаёт новый документ по образцу существующего") and immediately distinguishes itself from the create_* family, which "собирают документ из полей схемы и всё остальное теряют". An agent can tell this apart from add_document_line or update_entity without opening another schema.

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 names the primary use case (monthly recurring documents) and the alternative it replaces (create_*), plus the execution protocol: dry-run by default, write only with confirm=true, show preview and get consent first. It also spells out when responsibleRef is rejected (marked/invalid/service users, documents lacking both fields), which is genuine when-not guidance.

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

Deploy Server

Other Tools