Skip to main content
Glama
1C OData MCP

1C OData MCP

Остатки на складах (УТ 11, КА 2, ERP 2)

read.analytics.get_warehouse_stock
Read-only

Retrieves warehouse stock quantities by product, warehouse, or product group from 1C, with optional as-of date, search, and pagination. Use it to check current or historical on-hand and to-ship qty.

Instructions

Остатки товаров по регистру «Товары на складах» (оперативный учёт по складам: УТ 11, КА 2, ERP 2; проверено на УТ 11.5). В УТ нет Хозрасчётного: количество по складам — здесь, стоимость по регистру «Себестоимость товаров» — get_inventory; в Бухгалтерии, КА и ERP остатки по счетам с суммами — get_inventory. Только количество: inStock — в наличии, toShip — к отгрузке (зарезервировано под отгрузку, ещё на складе); сумм в этом регистре нет. Назначение, помещение, серия и партия сворачиваются. По умолчанию — текущие остатки, asOf=YYYY-MM-DD — на конец даты. warehouses — Ref_Key складов (ответ перечисляет их с типом в warehouseFilter); Ref_Key и типы складов с остатком — в byWarehouse при groupBy=warehouse на первой странице (у сети в сотни складов он может не поместиться — см. truncatedLists, сузьте warehouses). group — группа номенклатуры с подгруппами: Ref_Key, название или путь «Телефоны/Смартфоны/Apple» (несколько совпадений — отказ со списком путей); groups — несколько групп за один вызов, итоги каждой в byGroup, у позиции matchedGroupRef. query — часть названия или артикул, как в get_inventory. Характеристика — characteristicRef, название — если справочник характеристик опубликован; пустая характеристика обычна (товар без характеристик). Товары в пути между складами в остаток не входят. count — всего позиций; длинный список читайте с offset=nextOffset, пока он есть: следующие страницы в течение минуты берут строки первой, регистр заново не читается.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read.analytics.get_warehouse_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
asOfNoДата остатков — на конец этой даты (без параметра — текущие) (YYYY-MM-DD)
groupNoГруппа номенклатуры: Ref_Key, название или путь через «/» («Смартфоны/Apple»). Подгруппы входят
limitNoСколько позиций вернуть
queryNoПоиск товара: части слов из названия или артикул. Можно вместе с group или groups
groupsNoНесколько групп номенклатуры за один вызов (до 50), каждая как group, с подгруппами; вместо group. Позиция входит один раз; у вложенных групп — в самую глубокую. matchedGroupRef у позиции и byGroup с итогами по каждой группе
offsetNoС какой строки начать (0 — с начала); значение из nextOffset прошлого ответа
groupByNoitem — по номенклатуре (по умолчанию); warehouse — номенклатура в разрезе складовitem
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
snapshotNosnapshot прошлой страницы: если данные изменились, в ответе будет dataChanged
warehousesNoRef_Key складов (до 100); без параметра — все склады. Группа складов не принимается

Output Schema

NameRequiredDescriptionDefault
asOfNo
noteNo
scanYes
countYes
itemsYes
queryNo
byGroupNo
groupByNo
databaseYes
snapshotNo
itemGroupNo
itemGroupsNo
byWarehouseNo
dataChangedNo
totalToShipYes
otherSimilarNo
totalInStockYes
warehouseFilterNo

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?

Annotations only declare readOnlyHint and openWorldHint, but the description adds substantive behavior: default is current balances and asOf means end-of-date, dimensions (назначение, помещение, серия, партия) are collapsed, goods in transit are excluded, ambiguous group paths cause a refusal listing matching paths, and an empty characteristic is normal. It also documents pagination mechanics (count/nextOffset, first-page cache lasting about a minute) and the truncatedLists risk when byWarehouse spans hundreds of warehouses.

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 and the sibling distinction are correctly front-loaded, and nearly every sentence carries information, but the whole definition is delivered as one dense wall of text mixing scope, response fields, pagination, and group-matching failure modes. Bullets or paragraph breaks would let an agent scan for the relevant fact instead of parsing the entire block.

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 ten-parameter, zero-required analytics tool with an output schema present, the description covers the remaining decisions an agent must make: which configuration maps to which tool, quantity-vs-cost scope, date semantics, pagination loop, and the truncated-list escape hatch. Return shape is left to the output schema, as appropriate.

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 all ten parameters, including group path syntax, the groups array, warehouses Ref_Key, asOf format, and offset. The description adds some response-side semantics (warehouseFilter, byWarehouse, matchedGroupRef, multiple-match refusal) but little new input meaning beyond the schema, so the baseline applies.

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?

Names the exact resource and register: остатки товаров по регистру «Товары на складах», with the verb implied precisely (return stock quantities). It explicitly separates itself from the sibling get_inventory (стоимость по регистру «Себестоимость товаров» / остатки по счетам с суммами), so an agent can pick the right tool without opening either schema.

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

Usage Guidelines5/5

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

Gives explicit routing rules per configuration: in УТ use this tool for quantities and get_inventory for cost; in Бухгалтерия/КА/ERP use get_inventory for account balances with sums. It also states a hard exclusion — «Только количество… сумм в этом регистре нет» — and notes that goods in transit are not counted.

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