Skip to main content
Glama
1C OData MCP

1C OData MCP

Создать поступление от поставщика

write.purchase.create_purchase

Creates an unposted supplier goods/services receipt with line items. Preview by default; set confirm=true to save, then post manually in 1C.

Instructions

Создаёт документ «Поступление товаров и услуг» (закупка у поставщика) с табличной частью «Товары». Документ НЕПРОВЕДЁННЫЙ; провести — вручную в 1С или post_document (тогда 1С сформирует проводки Дт 41/19 Кт 60; счёт расчётов — по настройке договора, источник виден в предпросмотре). Позиции могут нести 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.purchase.create_purchase"
  }
}

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. Без указания — все организации базы.
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
Behavior4/5

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

Annotations only give the generic readOnly=false / destructive=false / openWorld=true profile; the description adds real behavior — the created document is deliberately left unposted, posting must be done manually or via post_document and generates Дт 41/19 Кт 60 entries, the settlement account comes from contract settings and is visible in the preview, and idempotency is handled through operationId. The preview/confirm workflow is the most valuable disclosure here. It does not describe the preview payload itself, which is acceptable given the output schema.

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 what gets created and its unposted state, then the posting path, then the dry-run confirm protocol — a sensible ordering for an agent. Dense but nearly every clause carries operational information; a small amount of overlap between the content-line sentence and the schema description.

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 17-parameter mutation with an output schema and annotations, the description covers the riskiest gaps: write-vs-preview semantics, idempotency, posting side effects, and the supplier/contract type constraint. It does not clarify how this document differs from the sibling purchase-invoice/order tools, which is the remaining ambiguity an agent could hit.

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 meaning not in the schema: counterpartyRef must be a supplier, contractRef must be of type «СПоставщиком», and the settlement account derives from contract settings. The note on content for service lines largely restates the schema field. Net effect is above baseline but not fully additive across all 17 parameters.

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 «Поступление товаров и услуг» (supplier purchase) with a «Товары» table section — and immediately pins its document type against the sibling write.purchase.create_supplier_order / create_supplier_invoice family by naming the exact 1C document. The agent can identify the tool without opening the schema.

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 operating procedure: default dry-run, actual creation only with confirm=true, show the preview and obtain user consent first, then resend operationId with identical arguments, and retry with the same id after a timeout rather than making a new preview. It also names post_document as the alternative for posting and restricts the counterparty/contract type. It stops short of stating when to prefer this over the sibling purchase documents, which keeps it off a 5.

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