Skip to main content
Glama
1C OData MCP

1C OData MCP

Закупки в разрезах

read.analytics.get_purchases_report
Read-only

Retrieve purchase totals for a period by item, warehouse, department, supplier, or other dimensions, with optional period comparison and ABC classification.

Instructions

Закупки за период в разрезах на выбор (Управление торговлей, регистр «Закупки»; в Бухгалтерии закупки по документам — get_purchases_breakdown). groupBy — до трёх разрезов: item (товар), itemGroup (группа товара), warehouse (склад), department, manager, partner (поставщик), organization, operation, period. period — day, week, month (по умолчанию), quarter. У строки: quantity, amount и amountExVat (сумма закупки с НДС и без), discount (скидка поставщика). compareWith — previousPeriod или previousYear: у строки prev и growth (рост суммы в %), итог сравнения — в compare. sortBy — amount (по умолчанию), amountExVat, quantity, discount; abc=true — класс A/B/C по накопленной доле. Отборы: organization, warehouses, departments, managers, partners (Ref_Key поставщиков). count — всего строк; длинный список — с offset=nextOffset.

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": {
      "from": "<from>",
      "to": "<to>",
      "groupBy": "<groupBy>"
    },
    "name": "read.analytics.get_purchases_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesКонец периода (включительно) (YYYY-MM-DD)
abcNoКласс A/B/C по накопленной доле sortBy: A — до 80 %, B — до 95 %
fromYesНачало периода (включительно) (YYYY-MM-DD)
limitNoСколько строк вернуть
offsetNoС какой строки начать (0 — с начала); значение из nextOffset прошлого ответа
periodNoШаг разреза period (по умолчанию month)
sortByNoСортировка по убыванию (и метрика для abc)amount
groupByYesРазрезы по порядку, до трёх: напр. ["department", "period"]
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
managersNoУТ: только эти менеджеры (read.catalog.list_users)
partnersNoТолько эти поставщики (партнёры)
warehousesNoУТ: только эти склады
compareWithNoСравнить с таким же периодом перед этим или с тем же периодом год назад
departmentsNoТолько эти подразделения
organizationNoОрганизация: часть названия, ИНН или Ref_Key

Output Schema

NameRequiredDescriptionDefault
toYes
fromYes
noteNo
scanYes
countYes
itemsYes
amountYes
periodNo
compareNo
groupByYes
databaseYes
discountNo
quantityYes
amountExVatNo
organizationNo
configurationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds real operational context beyond them – row shape (quantity, amount, amountExVat, discount), comparison output fields (prev, growth, compare), ABC classification semantics, and pagination via count/offset=nextOffset. Return-value detail overlaps the output schema, but the pagination and comparison behavior is genuinely additive.

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 paragraph that front-loads the purpose and then walks through groupBy, period, row metrics, comparison, sorting, filters, and pagination in a predictable order. Nothing is wasted, though several clauses restate schema-documented defaults and enums.

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 15-parameter analytical tool, the description covers dimension choices, period granularity, metrics, comparison output, sorting/ABC, filter fields, and pagination on long results – enough for an agent to call it correctly. The database-selection caveat lives in the schema, and the output schema carries the return shape.

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 baseline is 3, and the description still adds meaning: groupBy is capped at three dimensions with an ordered example, period's default is restated with allowed steps, compareWith's effect on row fields (prev/growth) is spelled out, and sortBy is tied to the abc metric. It largely mirrors the schema's own enum and default documentation, which keeps it from a 5.

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?

Opens with a specific verb+resource: purchases for a period broken down by selectable dimensions in the УТ «Закупки» register. It also names the sibling for the accounting case (get_purchases_breakdown), so the agent can distinguish the two 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 Guidelines4/5

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

Explicitly routes the accounting-document variant to get_purchases_breakdown, which is a real when-to-use/alternative rule. Beyond that routing it gives no exclusions or prerequisites (e.g. when a breakdown is too granular or too expensive), so it stops short of a full 5.

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