Skip to main content
Glama
1C OData MCP

1C OData MCP

Создать заказ клиента

write.sales.create_customer_order

Creates a customer order in 1C Trade Management with product lines, warehouse, and agreement, using a dry-run preview and explicit confirmation before writing.

Instructions

Управление торговлей: создаёт «Заказ клиента» со строками товаров, складом и соглашением. По умолчанию статус «К обеспечению» (status — иначе). Хозяйственные операции: РеализацияКлиенту. НЕПРОВЕДЁННЫЙ; провести — post_document. dry-run/confirm. В Бухгалтерии — отказ.

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_customer_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoДата документа YYYY-MM-DD (по умолчанию — момент предпросмотра)
linesYesПозиции заказа
statusNoСтатус заказа (значение 1С, напр. КОбеспечению, НеСогласован)
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. Без указания — все организации базы.
operationKindNoУправление торговлей: хозяйственная операция (по умолчанию основная для документа; комиссия — явно)
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.3/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses the crucial behavioral fact that the created order is left unposted, the default status «К обеспечению», the business operation used, and the dry-run/confirm protocol including operationId replay. It also names a hard environmental restriction (refused in Accounting), which is exactly the kind of context annotations cannot carry.

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?

The key statement (what it creates and that it stays unposted) is front-loaded, and every clause carries information with no filler. The telegraphic fragments ("dry-run/confirm", "В Бухгалтерии — отказ") are efficient but cost some readability.

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 an 18-parameter mutation with a rich schema, output schema and annotations, the description covers the creation workflow, posting hand-off, default status and base restriction. It leaves reference-resolution hints (list_databases, list_organizations) to the schema, which is acceptable, though a pointer to the dry-run result usage could be clearer.

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 baseline is 3 and the schema already explains all 18 parameters in detail. The description adds only a little meaning on top, chiefly the default status value and the default business operation, both of which refine rather than replace the schema text.

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 concrete verb-plus-resource in the target subsystem ("Управление торговлей: создаёт «Заказ клиента»") and lists the components it builds (lines, warehouse, agreement). It also marks the boundary with the posting operation ("НЕПРОВЕДЁННЫЙ; провести — post_document") and the bases it refuses in, so an agent can tell exactly which document this produces.

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?

It gives clear operating context: dry-run/confirm is mandatory, posting goes through post_document, and the tool refuses in the Accounting base. What is missing is guidance against the many sibling sales documents (create_invoice, create_shipment, create_act) — nothing states when a customer order is preferred over those.

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