Skip to main content
Glama
1c-odata-mcp

1c-odata-mcp

by foxnaim

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

write.document.add_document_line

Add a product or service line to an existing unposted 1C document while preserving current table rows; supports dry-run preview and confirmation before writing.

Instructions

Добавляет одну позицию в табличную часть «Товары» существующего НЕПРОВЕДЁННОГО документа (счёт/поступление/реализация), сохраняя прежние строки со всеми их реквизитами (содержание, счета учёта, номенклатурная группа). dry-run/confirm.

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 observedv0.12.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses two non-obvious behaviors: existing lines and all their attributes (содержание, счета учёта, номенклатурная группа) are preserved, and the target document must be unposted. This is real behavioral context an agent would otherwise have to guess. The dry-run/confirm mention is redundant with the confirm parameter text, so it does not add further weight.

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 front-loaded sentence that packs the scope, the target tabular section, and the preservation guarantee, followed by a two-word workflow tag. Nothing is padded; the only weakness is that the trailing «dry-run/confirm» is too terse to be self-explanatory and relies on the schema.

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 nested-object write tool with 6 parameters, the definition supplies the key constraints (unposted only, additive not replacing, dry-run first) while a rich schema and an output schema cover inputs and returns. It does not spell out which entitySet values are valid or what errors arise from posting status, but this is a minor residual gap given the surrounding structured data.

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 documents ref, entitySet, line fields, confirm, operationId and database in detail, including defaults and fallbacks for accounts. The description mentions the preserved attributes (content, accounts, nomenclature group) but adds no parameter-level semantics of its own. Baseline 3 applies when the schema carries the full burden.

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?

The description names a specific verb and resource («Добавляет одну позицию в табличную часть «Товары»»), scopes it to existing UNPOSTED documents of named types, and implicitly separates it from siblings that create whole documents or replace lines. It stops short of naming the concrete alternatives (update_document_lines, remove_document_line), so it is clear but not sibling-differentiating to the highest degree.

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 «НЕПРОВЕДЁННОГО документа» restriction tells the agent a precondition, and «dry-run/confirm» signals the workflow, but there is no explicit statement of when to choose this tool over update_document_lines, remove_document_line, or creating a new document. The agent must infer the decision boundary from the sibling names.

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