Skip to main content
Glama
1C OData MCP

1C OData MCP

Добавить строку в документ

write.document.add_document_line

Adds one item line to the Goods table of an existing unposted 1C document while preserving existing lines and their details; supports dry-run preview then confirmed write.

Instructions

Добавляет одну позицию в табличную часть «Товары» существующего НЕПРОВЕДЁННОГО документа (счёт/поступление/реализация), сохраняя прежние строки со всеми их реквизитами (содержание, счета учёта, номенклатурная группа). 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": {
      "entitySet": "<entitySet>",
      "ref": "<ref>",
      "line": "<line>"
    },
    "name": "write.document.add_document_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
refYesRef_Key документа (GUID)
lineYesДобавляемая позиция
confirmNofalse (по умолчанию) — только предпросмотр (dry-run), запись НЕ выполняется. true — выполнить создание. Сначала всегда показывайте dry-run и получайте согласие пользователя; при подтверждении передавайте operationId из результата предпросмотра и те же аргументы. После таймаута повторяйте подтверждение с тем же id, не создавая новый предпросмотр.
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
entitySetYesИмя документа, напр. Document_РеализацияТоваровУслуг
operationIdNoUUID из предпросмотра. Передайте его при confirm=true, чтобы повтор не создал дубликат.

Output Schema

NameRequiredDescriptionDefault
refNo
noteNo
notesNo
dryRunNo
fieldsNo
updatedNo
databaseNo
replayedNo
verifiedNo
entitySetNo
willPatchNo
descriptionNo
operationIdNo
readbackNoteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare that this is a non-read-only, non-destructive, open-world write. The description adds genuinely useful behavior beyond that: the operation is restricted to unposted documents, it appends rather than replaces (preserving content, accounting accounts, and nomenclature group on existing lines), and it runs through a dry-run/confirm cycle. It stops short of saying what error occurs on a posted document or what permissions are needed.

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?

A single dense sentence front-loads the action, target, and constraints, followed by a two-word workflow marker. Nothing is redundant, though the 'dry-run/confirm.' fragment is telegraphic and would read better as a short clause.

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 mutation tool with an output schema and fully documented parameters, the description covers the essentials an agent needs: what gets created, which documents accept it, that existing data survives, and that confirmation is required. Return-value details and per-parameter syntax are correctly delegated to the output schema and input schema.

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 description coverage is 100%, so the schema already explains every parameter including the nested line object and the confirm/operationId protocol. The description adds only the terse 'dry-run/confirm' phrase, which is already spelled out in far more detail in the confirm parameter. Baseline 3 applies since the schema does the heavy lifting.

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 uses a specific verb and resource — adds one line item to the «Товары» tabular section of an existing document — and pins the scope with two constraints: the document must be unposted (НЕПРОВЕДЁННОГО), and existing lines with all their attributes are preserved. That 'exactly one line, others untouched' framing separates it functionally from update_document_lines and remove_document_line without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the trailing 'dry-run/confirm' signals a preview-then-commit flow, and 'НЕПРОВЕДЁННОГО' implies it should not be used on posted documents. The description never states when to prefer this over update_document_lines or remove_document_line, nor what to do if the document is already posted; the detailed preview/operationId procedure lives in the schema, not here.

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