Skip to main content
Glama
1C OData MCP

1C OData MCP

Создать реализацию покупателю

write.sales.create_shipment

Creates an unposted sales shipment document in 1C with line items for goods or services, defaulting to a dry-run preview and requiring confirmation to write.

Instructions

Создаёт документ «Реализация товаров и услуг» (отгрузка покупателю) с табличной частью «Товары». Документ НЕПРОВЕДЁННЫЙ; провести — вручную в 1С или post_document (тогда 1С сформирует проводки Дт 62 Кт 90, Дт 90 Кт 41 и др.; счёт расчётов — по настройке договора, источник виден в предпросмотре). Позиции могут нести content (Содержание строки — печатается в УПД) и свои счета доходов/расходов. По умолчанию 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": {
      "counterpartyRef": "<counterpartyRef>",
      "lines": "<lines>"
    },
    "name": "write.sales.create_shipment"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoДата документа YYYY-MM-DD (по умолчанию — момент предпросмотра)
linesYesПозиции документа
commentNoУправление торговлей: комментарий
confirmNofalse (по умолчанию) — только предпросмотр (dry-run), запись НЕ выполняется. true — выполнить создание. Сначала всегда показывайте dry-run и получайте согласие пользователя; при подтверждении передавайте operationId из результата предпросмотра и те же аргументы. После таймаута повторяйте подтверждение с тем же id, не создавая новый предпросмотр.
basisRefNoУправление торговлей: документ-основание — реализация (возврат клиента, счёт) или приобретение (возврат поставщику)
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
warehouseNoНазвание, код или Ref_Key склада (если в базе несколько)
contractRefNoRef_Key договора (необязательно)
operationIdNoUUID из предпросмотра. Передайте его при confirm=true, чтобы повтор не создал дубликат.
vatTaxationNoУправление торговлей: налогообложение НДС (ПродажаОблагаетсяНДС, ПродажаНеОблагаетсяНДС, …); по умолчанию — как в последнем документе организации
agreementRefNoУправление торговлей: Ref_Key соглашения с клиентом или поставщиком (одно у партнёра — само)
organizationNoОрганизация (юрлицо) для фильтра: часть названия, ИНН или Ref_Key из list_organizations. Без указания — все организации базы.
incomeAccountNoСчёт доходов для ВСЕХ строк документа — код как в 1С (напр. «90.01.2») или Ref_Key. Счёт, заданный в строке, важнее. Без указания — из регистра «Счета учёта номенклатуры», иначе 90.01.1.
operationKindNoУправление торговлей: хозяйственная операция (по умолчанию основная для документа; комиссия — явно)
expenseAccountNoСчёт расходов для ВСЕХ строк документа — код как в 1С (напр. «90.02.2») или Ref_Key. Счёт, заданный в строке, важнее. Без указания — из регистра «Счета учёта номенклатуры», иначе 90.02.1.
orgBankAccountNoБанковский счёт организации — печатается в документе как реквизиты для оплаты. Название/номер счёта (напр. «Сбербанк» или «40802…») либо Ref_Key. Без указания берётся ОСНОВНОЙ счёт организации.
paymentDueDateNoУправление торговлей: дата оплаты YYYY-MM-DD (по умолчанию — дата документа)
responsibleRefNoОтветственный документа — Ref_Key пользователя 1С (read.catalog.list_users): ставится в «Ответственный» или, где его нет (продажи и закупки УТ), в «Менеджер». Помеченный, недействительный и служебный — отказ; у документов без обоих полей (ПКО, РКО и заявка на расходование УТ) — отказ. Заменяет ответственного из fields
sumIncludesVatNoСумма включает НДС
counterpartyRefYesRef_Key контрагента

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.6/5.0
Behavior5/5

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

Adds substantial behaviour beyond the annotations (readOnlyHint=false, destructiveHint=false): the created document is left unposted, what posting would produce (Дт 62 Кт 90, Дт 90 Кт 41), that the settlement account comes from the contract setting, and the dry-run/confirm/operationId idempotency flow that prevents duplicates. This covers side effects and safety well beyond what the annotations declare.

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?

Purpose is front-loaded in the first clause, followed by posting behaviour, line-level content, and the dry-run rule. It is a single dense paragraph with heavy parenthetical nesting, which slightly hurts scanability, but nearly every clause carries decision-relevant information.

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 20-parameter mutation tool with an output schema present, the definition covers the key things an agent needs: creation vs posting split, dry-run confirmation protocol, idempotency, buyer/contract constraints, and account defaulting. Return values need not be described because an output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: the counterparty is specifically the buyer and the contract must be of type «СПокупателем», and it explains that line-level income/expense accounts take precedence over document-level ones by pointing at the account defaulting chain. It does not enumerate the remaining optional УТ-specific parameters, but the schema already documents those.

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: creates the 1C document «Реализация товаров и услуг» (отгрузка покупателю) with its «Товары» tabular section. It immediately distinguishes the tool from the posting path by declaring the document НЕПРОВЕДЁННЫЙ and pointing to post_document for posting, which separates it from sibling creation tools such as create_issued_invoice or create_services_act.

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?

Gives explicit operational guidance: dry-run by default, creation only with confirm=true, always show the preview and get user consent, reuse the operationId on retry after a timeout. It also constrains inputs (counterparty must be a buyer, contract must be вида «СПокупателем»). It does not explicitly say when to choose this document versus the sibling act/invoice creation tools, so it stops short of full alternative routing.

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