Skip to main content
Glama
1C OData MCP

1C OData MCP

Установить цены номенклатуры

write.pricing.create_price_setting

Creates a draft 1C price setting document for a single price kind with a dry-run preview of current vs. new prices and conflict warnings; prices apply only after posting.

Instructions

Создаёт документ «Установка цен номенклатуры» по одному виду цен — непроведённым; цены вступают в силу после проведения (write.document.post_document, отдельный предпросмотр). Предпросмотр показывает по каждой позиции текущую цену и новую (prices) и предупреждает: у вида цен есть зависимые виды (наценка на этот вид) — 1С их при записи через OData не пересчитает; у позиции уже есть цена с более поздней датой — новая её не перекроет; цена на тот же момент — отказ. date — момент цены, по умолчанию сейчас (по часам компьютера с коннектором); дата без времени — начало дня. До 1000 строк на документ; не помещаются в ответ — строки prices сжимаются, а то и остаются только отклонения (изменение больше 20 %, нет текущей цены, более поздняя цена, пометка удаления), счёт по всем строкам — summary. Механизм определяется по базе (mechanism — явно): Управление торговлей 11 — прежний (legacy) или ценообразование 2.5 (на живой базе не проверено); Бухгалтерия 3.0 — по типам цен (bp, вид цен — тип цен номенклатуры). КА 2 и ERP 2 — по тем же полям, что УТ, без проверки.

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": {
      "priceKind": "<priceKind>",
      "lines": "<lines>"
    },
    "name": "write.pricing.create_price_setting"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoМомент цены; по умолчанию сейчас (YYYY-MM-DD или YYYY-MM-DDTHH:mm:ss)
linesYes
commentNoКомментарий документа
confirmNofalse (по умолчанию) — только предпросмотр (dry-run), запись НЕ выполняется. true — выполнить создание. Сначала всегда показывайте dry-run и получайте согласие пользователя; при подтверждении передавайте operationId из результата предпросмотра и те же аргументы. После таймаута повторяйте подтверждение с тем же id, не создавая новый предпросмотр.
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
mechanismNoМеханизм цен: legacy — прежний УТ (табличная часть «Товары»), 2.5 — ценообразование 2.5, bp — Бухгалтерия (типы цен). Без параметра определяется по последним проведённым документам и записям регистров
priceKindYesВид цен: Ref_Key или точное название
operationIdNoUUID из предпросмотра. Передайте его при confirm=true, чтобы повтор не создал дубликат.
responsibleRefNoОтветственный (Ref_Key пользователя 1С — найдите через read.catalog.list_users; помеченный, недействительный и служебный — отказ)

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.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true) it discloses real side-effect risks: dependent price kinds are not recalculated by 1С through OData, a later-dated existing price is not overwritten, a same-moment price causes rejection, and the 2.5 mechanism is «на живой базе не проверено». It also explains the 1000-row limit and the response-compression/summary behavior, which no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded, but the body is one dense run-on block chaining preview warnings, row limits, response truncation, and per-database mechanism rules with semicolons and parentheses. The information is valuable yet not segmented, making it harder to scan than a short structured list would be.

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 9-parameter mutation with an output schema and database-dependent behavior, the description covers the confirm/preview contract, price-activation timing, per-configuration mechanism selection, and known data-loss caveats. An agent has enough to call it correctly and to warn the user about the dependent-price-kind and later-date cases.

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?

With schema coverage at 89%, the baseline is 3, but the description adds genuine meaning: date is the price moment defaulting to the connector machine's clock with date-only meaning start of day, and mechanism is inferred from recent documents and register records when omitted. It does not elaborate on priceKind, confirm, or operationId beyond what the schema already states.

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 opening clause names a specific verb and resource («Создаёт документ «Установка цен номенклатуры»»), pins the scope to one price kind, and states the resulting state («непроведённым»), so the agent knows exactly what is produced. It also distinguishes itself from the posting step by naming write.document.post_document as the separate action that activates the prices.

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 context: create unposted, then post via write.document.post_document, with a separate preview stage, and it explains that mechanism is auto-detected unless passed explicitly. It does not name a situation where a different pricing tool should be used instead, so it stops short of full when/when-not guidance.

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