Skip to main content
Glama
1C OData MCP

1C OData MCP

Продажи в разрезах

read.analytics.get_sales_report
Read-only

Generate a sales report for any period grouped by up to three dimensions, with revenue, cost, margin, ABC classes, and comparison to previous period or year.

Instructions

Продажи за период в разрезах на выбор — один инструмент для Управления торговлей и Бухгалтерии. groupBy — до трёх разрезов: в УТ item (товар), itemGroup (группа товара), warehouse (склад или магазин), department (подразделение), manager (менеджер), partner (клиент), organization, operation (хозяйственная операция), period; в Бухгалтерии item, itemGroup (номенклатурная группа), department, organization, period — по счёту 90 (покупателя у счёта нет: разрез по контрагенту и договору — get_sales_breakdown). period — day, week, month (по умолчанию), quarter. У строки: quantity, revenue и revenueExVat (выручка с НДС и без), cost, costExVat, margin, marginExVat (себестоимость и валовая прибыль; до расчёта себестоимости за месяц — предварительные, дату называет note). Метрика, которую нельзя разделить по разрезу (в Бухгалтерии себестоимость и НДС без номенклатуры), не выводится — сказано в note. compareWith — previousPeriod (такой же период перед этим; целые месяцы — столько же месяцев назад, месяц «по сегодня» — те же числа прошлого месяца) или previousYear: у строки prev и growth (рост выручки в %), итог сравнения — в compare. sortBy — по чему сортировать (по умолчанию revenue); abc=true — класс A/B/C по накопленной доле этой метрики (80 % / 95 %). Отборы: 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_sales_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)revenue
groupByYesРазрезы по порядку, до трёх: напр. ["department", "period"]
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
managersNoУТ: только эти менеджеры (read.catalog.list_users)
partnersNoУТ: только эти клиенты (партнёры)
warehousesNoУТ: только эти склады
compareWithNoСравнить с таким же периодом перед этим или с тем же периодом год назад
departmentsNoТолько эти подразделения
organizationNoОрганизация: часть названия, ИНН или Ref_Key

Output Schema

NameRequiredDescriptionDefault
toYes
costNo
fromYes
noteNo
scanYes
countYes
itemsYes
marginNo
periodNo
compareNo
groupByYes
revenueYes
databaseYes
discountNo
quantityYes
costExVatNo
marginExVatNo
organizationNo
revenueExVatNo
configurationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds substantial behavioral detail well beyond that: cost/margin figures are provisional until the monthly cost calculation (with a date surfaced in note), metrics that cannot be split by the chosen dimension are silently omitted and reported in note, and compareWith/abc output fields (prev, growth, compare, A/B/C class) are described. Pagination behaviour is also disclosed (count = total rows, continue with offset=nextOffset).

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?

The purpose is front-loaded and virtually every clause carries information that is not already in structured fields. The downside is that all of it is packed into one dense run-on paragraph with semicolon-delimited clauses, which makes it harder to scan than a short bulleted structure would.

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 analytics tool with an output schema, this is complete: it explains the per-system dimension constraints, the comparison and ABC mechanics, and how to page through long results. Return-value fields are covered (quantity, revenue/revenueExVat, cost, margin, prev, growth) so nothing an agent needs to call or interpret the result correctly is missing.

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 100% schema coverage the baseline is 3, but the description adds genuine meaning the schema cannot express: which groupBy values are legal in УТ versus Бухгалтерия, that the default period is month, the exact semantics of previousPeriod for whole months versus a month 'up to today', and that abc operates on the cumulative share of the sortBy metric. The organization/warehouses/departments/managers/partners filters are named but not given additional syntax detail beyond the schema.

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 first clause names a specific verb and resource ('Продажи за период в разрезах') and immediately frames the tool as the single entry point for both Управление торговлей and Бухгалтерия. It also carves out the case it does NOT cover, routing counterparty/contract breakdowns to get_sales_breakdown, so an agent can separate it from at least one sibling without opening a 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?

The description explicitly tells the agent which product configurations are served and when to pick get_sales_breakdown instead (no customer dimension on account 90). It does not address when to prefer get_sales or get_sales_register, so routing against the wider sibling set is left partly to inference.

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