Skip to main content
Glama
1c-odata-mcp

1c-odata-mcp

by foxnaim

Создать возврат товаров от покупателя

write.warehouse.create_return_from_customer

Creates an unposted customer goods return document in 1C with item lines, using dry-run preview and confirmation before writing.

Instructions

Создаёт документ «Возврат товаров от покупателя» с табличной частью «Товары». НЕПРОВЕДЁННЫЙ; провести — post_document (проводки сторнируют реализацию: Дт 90.02 Кт 41, Дт 62 Кт 90.01 со знаком минус; счёт расчётов — по настройке договора, источник виден в предпросмотре). dry-run/confirm. Контрагент — покупатель.

Input Schema

NameRequiredDescriptionDefault
dateNoДата документа YYYY-MM-DD (по умолчанию сегодня)
linesYesПозиции документа
confirmNofalse (по умолчанию) — только предпросмотр (dry-run), запись НЕ выполняется. true — выполнить создание. Сначала всегда показывайте dry-run и получайте согласие пользователя; при подтверждении передавайте operationId из результата предпросмотра и те же аргументы. После таймаута повторяйте подтверждение с тем же id, не создавая новый предпросмотр.
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию.
warehouseNoНазвание склада (если в базе несколько)
contractRefNoRef_Key договора (необязательно)
operationIdNoUUID из предпросмотра. Передайте его при confirm=true, чтобы повтор не создал дубликат.
organizationNoОрганизация (юрлицо) для фильтра: часть названия, ИНН или Ref_Key из list_organizations. Без указания — все организации базы.
incomeAccountNoСчёт доходов для ВСЕХ строк документа — код как в 1С (напр. «90.01.2») или Ref_Key. Счёт, заданный в строке, важнее. Без указания — из регистра «Счета учёта номенклатуры», иначе 90.01.1.
expenseAccountNoСчёт расходов для ВСЕХ строк документа — код как в 1С (напр. «90.02.2») или Ref_Key. Счёт, заданный в строке, важнее. Без указания — из регистра «Счета учёта номенклатуры», иначе 90.02.1.
sumIncludesVatNoСумма включает НДС
counterpartyRefYesRef_Key контрагента

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

A3.8/5.0
Behavior3/5

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

Beyond the annotations (readOnly=false, destructive=false, openWorld=true) the description adds real value: the document is unposted, the postings reverse the sale (Дт 90.02 Кт 41, Дт 62 Кт 90.01 with negative sign), and the settlement account comes from the contract with its source visible in the preview. The dry-run/confirm requirement is also disclosed. However, it says nothing about side effects on stock balances, duplicate protection beyond operationId, or what the preview contains, so it is strong but not exhaustively transparent.

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?

Four short sentences, front-loaded with what is created, then the posting/workflow constraints. Dense accounting jargon (Дт/Кт entries) in the middle sentence is useful but makes the block harder to scan; nothing is outright wasted.

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 12-parameter mutation with an output schema and annotations, the description covers creation semantics, posting path, and the confirmation workflow. What is missing is the relationship to an originating sale/shipment document and warehouse stock impact, which an agent would likely want before calling.

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 description coverage is 100%, so the baseline would be 3. The description still adds meaning by clarifying that counterpartyRef must be a buyer and that the settlement account is derived from the contract settings rather than passed in. It does not explain the line-level account overrides or sumIncludesVat, but those are already well documented in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 document «Возврат товаров от покупателя» with the «Товары» tabular section, and 'Контрагент — покупатель' implicitly separates it from the sibling write.warehouse.create_return_to_supplier. It stops short of naming that sibling explicitly, so the differentiation relies on the agent knowing the Russian document names.

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?

Explicitly says the document is created НЕПРОВЕДЁННЫЙ and routes posting to post_document, and it spells out the dry-run → confirm sequence. It does not cover when to prefer this over create_return_to_supplier (e.g. buyer vs supplier context), leaving that one inference.

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