Skip to main content
Glama
1c-odata-mcp

1c-odata-mcp

by foxnaim

Создать счёт покупателю

write.sales.create_invoice

Creates a draft customer invoice in 1C with goods or service lines; previews first and writes only after confirmation.

Instructions

Создаёт счёт на оплату покупателю (документ) с табличной частью «Товары». Документ создаётся НЕПРОВЕДЁННЫМ (черновик) — провести можно вручную в 1С или инструментом post_document. Для услуг задавайте content в строке — это «Содержание», именно оно печатается в счёте. По умолчанию предпросмотр (dry-run); создание — при confirm=true. Контрагент и (опц.) договор — по Ref_Key; позиции — по Ref_Key номенклатуры.

Input Schema

NameRequiredDescriptionDefault
dateNoДата документа YYYY-MM-DD (по умолчанию сегодня)
linesYesПозиции счёта
confirmNofalse (по умолчанию) — только предпросмотр (dry-run), запись НЕ выполняется. true — выполнить создание. Сначала всегда показывайте dry-run и получайте согласие пользователя; при подтверждении передавайте operationId из результата предпросмотра и те же аргументы. После таймаута повторяйте подтверждение с тем же id, не создавая новый предпросмотр.
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию.
contractRefNoRef_Key договора (необязательно)
operationIdNoUUID из предпросмотра. Передайте его при confirm=true, чтобы повтор не создал дубликат.
organizationNoОрганизация (юрлицо) для фильтра: часть названия, ИНН или Ref_Key из list_organizations. Без указания — все организации базы.
orgBankAccountNoБанковский счёт организации — печатается в документе как реквизиты для оплаты. Название/номер счёта (напр. «Сбербанк» или «40802…») либо Ref_Key. Без указания берётся ОСНОВНОЙ счёт организации.
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

A4.6/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), it discloses the key behavioral trait that the record is created as an unposted draft, not a posted document. It also explains the dry-run-by-default flow, the confirm/operationId idempotency contract, and that the main bank account is used when none is given — exactly the mutation context an agent needs.

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 description is front-loaded with purpose, then draft status, then the dry-run workflow, which is the right order for an agent. A few clauses (the 'content' explanation) restate schema text, but nothing is wasted or misleading.

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?

With 10 parameters, a nested lines array, an output schema, and openWorldHint=true, the description still covers the essential gaps: draft-vs-posted state, the two-step confirm flow, idempotency via operationId, and defaulting rules. Nothing an agent needs to invoke it safely is missing.

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; the description adds genuine usage-level meaning on top by tying 'content' to service lines and the printed invoice/УПД text, and by stating that counterparty/contract are referenced by Ref_Key. Most other parameters are left to the already-rich schema.

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 names a specific verb and resource (создаёт счёт на оплату покупателю, документ с табличной частью «Товары») and immediately frames it as a draft, which separates it from posting tools. It also implicitly distinguishes the invoice (счёт на оплату) from the issued invoice (create_issued_invoice) by describing the printable 'Содержание' semantics.

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 guidance: the document is created unposted and can be posted later in 1C or via post_document, and for service lines you must fill 'content'. It does not explicitly say when to pick this over sibling write.sales.create_issued_invoice or create_shipment, so the alternative-selection guidance is partial.

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