Skip to main content
Glama
1C OData MCP

1C OData MCP

Поиск документов

read.document.search_documents
Read-only

Search 1C documents by period, number, counterparty, organization, posting status, amount, or kind, with pagination and entity-set filters.

Instructions

Ищет документы по периоду, номеру, контрагенту, организации, статусу проведения и сумме. Тип задаётся видом (kind: продажи, покупки, банк, касса…) или техническим именем entitySet из list_entities; без обоих — по всем основным видам документов сразу («все документы за 10 сентября», «документ №33»). number — номер как его называет человек: «33» находит 0000-000033, а также входящий номер документа контрагента (накладной поставщика). Нумерация в 1С каждый год своя — по одному номеру обычно несколько документов разных лет; уточняйте период. Редкие виды (зарплата, регламентные операции) — только через entitySet. Ответ постраничный: count и returned — строк на этой странице, а не всего, страница короче limit, если не помещается. При nextOffset читайте дальше; truncated без nextOffset значит, что в видах из cappedSets выборка упёрлась в ODATA_ANALYTICS_MAX_ROWS при отборе на стороне коннектора (контрагент, номер): сузьте период или укажите entitySet. Посчитать сумму за период проще get_payments_breakdown и get_sales_breakdown: там итог сразу, но только по проведённым; здесь по умолчанию и непроведённые.

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.document.search_documents"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoДата конца (YYYY-MM-DD)
fromNoДата начала (YYYY-MM-DD)
kindNoВид документа: sales — реализации и акты, customer_invoices — счета покупателям, purchases — поступления, supplier_invoices — счета поставщиков, bank — банк (поступления, списания, платёжки), cash — касса и оплаты платёжной картой (ПКО, РКО, ОплатаПлатежнойКартой), vat_invoices — счета-фактуры, warehouse — складские (в УТ — и оприходование излишков, списание недостач, пересчёт), prices — установки цен, orders — заказы клиентов и поставщикам, payment_requests — заявки на расходование денег
limitNoСколько документов вернуть
numberNoНомер документа: «33», «№ 0000-000033», входящий «ГК-22537»
offsetNoС какой строки начать (0 — с начала); значение из nextOffset прошлого ответа
databaseNoИмя базы 1С из list_databases. Без указания — база по умолчанию; если баз несколько и неясно какая, спросите пользователя.
entitySetNoТехническое имя документа, напр. Document_РеализацияТоваровУслуг; не вместе с kind
minAmountNoМинимальная сумма документа
postedOnlyNoТолько проведённые документы
organizationNoОрганизация (юрлицо) для фильтра: часть названия, ИНН или Ref_Key из list_organizations. Без указания — все организации базы.
responsibleRefNoОтветственный документа — Ref_Key пользователя 1С (read.catalog.list_users): поле «Ответственный», где его нет — «Менеджер» (продажи и закупки УТ). Документы без этих полей пропускаются (skipped)
counterpartyRefNoRef_Key контрагента для фильтра

Output Schema

NameRequiredDescriptionDefault
noteNo
rowsYes
countYes
offsetYes
returnedYes
truncatedYes
nextOffsetNo
counterpartyFilterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint, it discloses pagination semantics (count and returned are per-page, a short page means fewer fit, follow nextOffset), the meaning of truncated without nextOffset (ODATA_ANALYTICS_MAX_ROWS cap during connector-side filtering, with remediation: narrow the period or pass entitySet), and that documents lacking the responsible field are returned as skipped. That is substantial operational context the annotations cannot express.

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 core purpose and filter list are front-loaded, with escalation details (yearly numbering, pagination, the analytics row cap) trailing in a sensible order. It is dense and long for a tool description; the ODATA_ANALYTICS_MAX_ROWS passage and cappedSets reference are close to implementation trivia, though they do serve as recovery instructions.

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?

With 13 optional parameters and an output schema present, the description still covers the things the schema cannot: number-matching behavior, mutual exclusivity of kind and entitySet, default inclusion of unposted documents, page-size semantics, and the fallback when truncation occurs. Nothing needed to call it correctly or recover from a limited result 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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: "33" also matches "0000-000033" and the counterparty's incoming invoice number, and numbering resets annually so a bare number usually spans several years — hence the advice to pin a period. It also states kind and entitySet are mutually exclusive. That goes beyond the enum and pattern already in 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 description opens with a specific verb plus resource ("Ищет документы") and immediately enumerates the filter axes: period, number, counterparty, organization, posting status, and amount. It also pins down the kind/entitySet dichotomy and the default behavior when neither is supplied (all main document types), so the agent can distinguish this from get_document or the breakdown tools without opening any 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?

It explicitly says when to use kind versus entitySet, that rare types (payroll, regulatory operations) are reachable only via entitySet, and that sums over a period are better served by get_payments_breakdown and get_sales_breakdown — with the caveat that those cover only posted documents while this tool includes unposted by default. Alternatives are named together with the condition that selects them.

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