Skip to main content
Glama
1c-odata-mcp

1c-odata-mcp

by foxnaim

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

write.document.copy_document

Copies an existing 1C document into a new unposted document with all details, allowing date, header, and line-item edits; requires preview confirmation before writing.

Instructions

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

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, чтобы повтор не создал дубликат.

Output Schema

NameRequiredDescriptionDefault
refNo
codeNo
noteNo
notesNo
dryRunNo
createdNo
payloadNo
databaseNo
replayedNo
entitySetNo
willCreateNo
descriptionNo
operationIdNo
writableBaseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.12.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, openWorldHint=true, destructiveHint=false, so the safety profile is already given. The description still adds meaningful context beyond that: the copy is created unposted, gets a new auto-assigned number and default-today date, and settlement accounts follow the source or the new contract. This is solid extra context, though it omits return-shape/pagination detail.

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?

It is front-loaded with purpose, then behavior, then parameter notes, and almost every sentence carries information. It is dense and long — the parenthetical attribute list and settlement-account sentence are heavy — but nothing is pure filler.

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 complex tool with nested objects, 8 parameters and a dry-run/operationId confirmation flow, the description covers creation behavior, numbering/date defaults, recalculation rules, and the write step. An output schema exists, so return values need not be explained.

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 all parameters. The description reinforces a few with extra meaning — fields use technical names 'as in update_entity', lines are edited by line number while the rest copy unchanged, and the sum recalculates unless set explicitly in fields. That is real value over the schema, but most semantics are already structured.

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 precise verb and resource: it creates a new document from an existing template by reading it whole and writing a copy. It explicitly contrasts this against the create_* siblings that 'build from schema fields and lose everything else', so an agent can distinguish it without opening schemas.

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 states the primary use case (monthly recurring documents) and names the alternative family (create_*) with the exact reason to prefer this tool. The dry-run / confirm=true / operationId workflow is spelled out, including what to do after a timeout.

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