Read-only 1C HTTP integration#
Module ID onec exposes schema/query, ping, warehouses, nomenclature, stock, images, document-text search and movements. It calls a published custom 1C HTTP service; it is not a direct SQL driver.
Metadata-bound queries#
Universal POST is restricted to /query and validates plans against service metadata. Missing service support raises an explicit unavailable/configuration error. An arbitrary SQL execution/1C slowdown diagnostic tool is not verified.
Large results#
Opt-in table offload stores report rows for Web presentation and returns descriptors/summary before LLM history. Non-Web/unbound outputs retain prior shape. Search validates IDs, deduplicates/sorts candidates and flags legacy nomenclature truncation around 1000 service items.
Exact registered tools#
Tool-by-tool operating guide#
The tables below describe the published inputs. Complete nested schemas and original registration metadata remain available in the expandable reference afterward. Fields marked optional may still be needed by the selected operation or provider; they are not permission to guess identities.
onec.describe_schema#
Lists the real service sources or reads one exact source’s fields, filters and aggregates. search is one literal fragment. A zero-match filter can return an unfiltered fallback with fallback_used=true; this does not mean that 1C has no data. Follow pagination when completeness matters.
Permission: onec.schema.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
source | No | string; minLength=1 |
search | No | string; maxLength=160 |
offset | No | integer; minimum=0; maximum=1000000 |
limit | No | integer; minimum=1; maximum=200 |
onec.query#
Executes a structured, read-only plan validated against discovered metadata. Use only real source and field names. The plan supports selection, filters, grouping, aggregates, ordering and pagination. Use server-side count/sum instead of adding thousands of model-visible rows. No arbitrary SQL or raw 1C query text is accepted.
Permission: onec.query.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
plan | Yes | object |
onec.ping#
Checks the configured service when connectivity is the question. Do not treat it as a prerequisite before every ordinary business-data read.
Permission: onec.health.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
This registration declares no input properties.
onec.list_warehouses#
Lists available warehouses/locations. For one named warehouse, resolve its exact identity instead of repeatedly listing all records.
Permission: onec.warehouses.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
This registration declares no input properties.
onec.find_items#
Finds plural categories using 1–12 distinct search terms and deduplicates real item GUIDs. Review semantic relevance and every page, not only a best match. complete=false can indicate the legacy first-1000 service cap; such results cannot establish an exhaustive category total.
Permission: onec.nomenclature.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
query | Yes | string; minLength=1 |
search_terms | Yes | array; minItems=1; maxItems=12 |
offset | No | integer; minimum=0 |
limit | No | integer; minimum=1; maximum=200 |
onec.get_stock_summary#
Aggregates stock for an exact warehouse and 1–500 explicitly selected item GUIDs. Include relevant items from every search page. Python performs the aggregation; zero-stock items are separate. The first-5000 stock cap fails rather than returning a deceptively complete total. Quantities with different units must not be added.
Permission: onec.stock.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
warehouse_id | Yes | string; minLength=1 |
nomenclature_ids | Yes | array; minItems=1; maxItems=500 |
onec.get_item_images#
Retrieves one existing photo per selected item, in batches of 1–20 real UUIDs. Images become owner-scoped chat files. no_photo means no stored photo; errors or complete=false mean incomplete retrieval. Do not invent image URLs or expose binary data in text.
Permission: onec.images.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
items | Yes | array; minItems=1; maxItems=20 |
onec.search_document_text#
Searches exposed document headers and tabular parts over inclusive YYYY-MM-DD dates using 1–8 meaningful terms matched with OR. Review complete and warnings. A header match does not prove that every line item matches. This metadata-bound search does not require a full-text index.
Permission: onec.document_text.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
search_terms | Yes | array; minItems=1; maxItems=8 |
date_from | Yes | string |
date_to | Yes | string |
source | No | string |
posted_only | No | boolean |
limit | No | integer; minimum=1; maximum=200 |
onec.search#
Searches indexed item/document text, such as notes or a person’s identifying phrase. It is distinct from the live metadata-bound document search. For current location of an exact physical item, reuse returned serial_id in get_stock; an old document does not prove current location.
Permission: onec.search.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
text | Yes | string; minLength=1 |
onec.get_stock#
Reads stock for real warehouse, item and/or serial GUIDs. Resolve names once and reuse the result. Display-name fields do not substitute for authoritative IDs.
Permission: onec.stock.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
warehouse_id | No | string; minLength=1 |
nomenclature_id | No | string; minLength=1 |
serial_id | No | string; minLength=1 |
warehouse_name | No | string; minLength=1 |
nomenclature_name | No | string; minLength=1 |
onec.get_movements#
Reads movement history for exact warehouse/item identifiers and optional inclusive dates. Reuse an established resolver identity rather than searching again. Historical movements and current stock answer different questions.
Permission: onec.movements.read. Registration: RiskLevel.READ / ApprovalMode.NEVER. Availability: enabled in the inspected source.
| Input | Required | Type and published constraints |
|---|---|---|
warehouse_id | No | string; minLength=1 |
nomenclature_id | No | string; minLength=1 |
warehouse_name | No | string; minLength=1 |
nomenclature_name | No | string; minLength=1 |
date_from | No | string; minLength=10 |
date_to | No | string; minLength=10 |
Complete schemas and registration reference#
onec.describe_schemaonec.schema.read
Discover real 1C data sources (catalogs, documents, document table parts, registers) and supported fields, filters, aggregates, and relations. For list call, search is ONE LITERAL fragment, not a list of synonyms. If literal search finds nothing, the Python client automatically returns an UNFILTERED page with fallback_used=true; choose a real source by meaning and proceed to detailed schema and onec.query. A zero-match text filter does NOT mean 1C has no sources. Paginate until has_more=false when needed. For detailed schema pass exact source ID. Do NOT invent fields. If server reports onec_universal_api_not_ready, ask for /schema /query 1C HTTP service update; old stock/movements continue working.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [],
"additionalProperties": false,
"properties": {
"source": {
"type": "string",
"minLength": 1,
"description": "Exact source ID from schema listing; omit to list."
},
"search": {
"type": "string",
"maxLength": 160,
"description": "Single literal substring of a source id/title; omit to list all. Multiple synonyms in one string are NOT an OR search; empty result triggers unfiltered fallback."
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
}
}
}onec.queryonec.query.read
Universal METADATA-BOUND READ-ONLY query for 1C catalogs, documents, document tabular parts and registers. First call onec.describe_schema for REAL source and field names; use only allowed fields/operators. Supply plan.source, select, filters, group_by, aggregates, order_by, offset and limit. For count/sum use server aggregate (not thousands of rows in LLM). For document lines use tabular-part SOURCE provided by schema with its exposed parent fields, do not invent joins. Read pages until has_more=false for an exhaustive listing. If source/fields missing or 1C server lacks /schema /query, report that limitation, never fabricate an answer. No raw SQL/1C query.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [
"plan"
],
"additionalProperties": false,
"properties": {
"plan": {
"type": "object",
"description": "Structured metadata-bound plan, never raw 1C query text.",
"properties": {
"source": {
"type": "string",
"minLength": 1
},
"select": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 50
},
"filters": {
"type": "array",
"maxItems": 40,
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"op": {
"type": "string",
"enum": [
"eq",
"ne",
"lt",
"lte",
"gt",
"gte",
"in",
"contains",
"starts_with",
"is_null"
]
},
"value": []
},
"required": [
"field",
"op",
"value"
],
"additionalProperties": false
}
},
"group_by": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 20
},
"aggregates": {
"type": "array",
"maxItems": 12,
"items": {
"type": "object",
"properties": {
"function": {
"type": "string",
"enum": [
"count",
"sum",
"min",
"max",
"avg"
]
},
"field": {
"type": "string"
},
"alias": {
"type": "string"
}
},
"required": [
"function",
"alias"
],
"additionalProperties": false
}
},
"order_by": {
"type": "array",
"maxItems": 10,
"items": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"direction": {
"type": "string",
"enum": [
"asc",
"desc"
]
}
},
"required": [
"field"
],
"additionalProperties": false
}
},
"offset": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
}
},
"required": [
"source"
],
"additionalProperties": false
}
}
}onec.pingonec.health.read
Check the configured read-only 1C HTTP API. Use only for an explicit connectivity/health request, not before every 1C read.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [],
"additionalProperties": false,
"properties": []
}onec.list_warehousesonec.warehouses.read
List all warehouses/locations from 1C. Prefer targets.resolve with provider='onec', kind='warehouse', desired_kind='warehouse' when the user names one warehouse; list all only when actually needed.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [],
"additionalProperties": false,
"properties": []
}onec.find_itemsonec.nomenclature.read
For plural/category searches in 1C (e.g. 'find mice', 'all Dell monitors', 'how many mice on IT warehouse'). Generate 1-12 distinct search_terms: synonyms, Ukrainian/Russian variants, and product category nouns; do not send the full user sentence as a single search term. For computer mice use category synonyms in the language of the source records; for other categories derive terms dynamically, NEVER hardcode a category-specific answer. Real 1C GUIDs returned by all search terms are deduplicated. Read EVERY page (offset/next_offset until has_more=false); semantically review all names/model/manufacturer and include EVERY relevant product but EXCLUDE accessories and unrelated matches. If complete=false, 1C FIRST 1000 was reached: do not assert that all records were found or that any category total is exact. Do not use targets.resolve, its top-8 candidates or fuzzy top-1 for PLURAL categories. For a single product use targets.resolve.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [
"query",
"search_terms"
],
"additionalProperties": false,
"properties": {
"query": {
"type": "string",
"minLength": 1
},
"search_terms": {
"type": "array",
"minItems": 1,
"maxItems": 12,
"items": {
"type": "string",
"minLength": 1
},
"description": "Separate UA/RU/EN synonyms/category terms generated from the user's intent."
},
"offset": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
}
}
}onec.get_stock_summaryonec.stock.read
Sum current warehouse stock for ALL explicitly selected real nomenclature GUIDs from onec.find_items. First resolve the ONE named warehouse to exact GUID with targets.resolve provider='onec' kind='warehouse', scope='one'. Supply EVERY relevant product GUID from EVERY find_items page (not just a best match). Stock is aggregated in Python, not in LLM. Zero-stock items are listed separately. If search was incomplete, never claim the total is complete. If 1C reaches its FIRST 5000 stock cap the tool fails rather than reporting a partial count. Do not add quantities with different units.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [
"warehouse_id",
"nomenclature_ids"
],
"additionalProperties": false,
"properties": {
"warehouse_id": {
"type": "string",
"minLength": 1
},
"nomenclature_ids": {
"type": "array",
"minItems": 1,
"maxItems": 500,
"items": {
"type": "string",
"minLength": 1
}
}
}
}onec.get_item_imagesonec.images.read
Show real 1C nomenclature photos directly in the authenticated Web chat. Use ONLY IDs returned by onec.find_items, stock, movement/document tool results or the relevant prior turn. For 'this item', reuse the previously resolved item UUID; ask if ambiguous. For 'all laptops in IT warehouse', select all item UUIDs with positive stock from that warehouse, NOT unrelated products/zero-stock items. For 'mouse issued to Filipovych', find the mouse UUID in actual movement document rows before using this tool. Supply 1..20 items per call with id and optional name. One existing 1C photo per item; no_photo means none stored. Errors/complete=false mean incomplete retrieval, not absence. Photos are attached automatically as owner-scoped files in the Web chat. Do NOT copy an image binary to the model or invent image URLs. If >20 items, make batches.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [
"items"
],
"additionalProperties": false,
"properties": {
"items": {
"type": "array",
"minItems": 1,
"maxItems": 20,
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"minLength": 36,
"maxLength": 36,
"description": "Exact nomenclature UUID from an existing tool result"
},
"name": {
"type": "string",
"maxLength": 160,
"description": "Display name from 1C result, not a search term"
}
},
"additionalProperties": false
}
}
}
}onec.search_document_textonec.document_text.read
Search ALL selectable/filterable STRING fields in real 1C DOCUMENT HEADERS AND TABULAR PARTS by period without the 1C full-text index. Prefer this for 'what broke in September', 'who got equipment temporarily', 'documents mentioning damage' and similar semantic searches. Provide 1-8 distinct meaningful Ukrainian/Russian stems or phrases as search_terms (for example, terms for temporary use, damage or malfunction in the language of the source records). Terms match ANY text field, not all simultaneously (OR). date_from/date_to inclusive YYYY-MM-DD, posted_only optional. For a known document type supply exact source ID; otherwise omit it to search all exposed document headers and tabular sections. Tabular rows are restricted to actual document UUIDs in the date range. Header matches do NOT prove every item in that document matches; query the part for product identity if needed. Inspect complete and warnings BEFORE claiming zero or exhaustive results. Use live /query rather than stale indexed onec.search for recent docs.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [
"search_terms",
"date_from",
"date_to"
],
"additionalProperties": false,
"properties": {
"search_terms": {
"type": "array",
"minItems": 1,
"maxItems": 8,
"items": {
"type": "string",
"minLength": 2,
"maxLength": 80
},
"description": "OR between terms and all real text fields: supply stems/synonyms, not full question."
},
"date_from": {
"type": "string",
"description": "YYYY-MM-DD inclusive"
},
"date_to": {
"type": "string",
"description": "YYYY-MM-DD inclusive"
},
"source": {
"type": "string",
"description": "Optional exact document.<name> header ID"
},
"posted_only": {
"type": "boolean",
"description": "Only posted documents; default false"
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 200
}
}
}onec.searchonec.search.read
Full-text search across indexed 1C nomenclature and warehouse documents. Use this when the user's identifying phrase may be in a comment, note, basis or other document text (for example a person's name or equipment nickname), not for an ordinary known warehouse/nomenclature name. For ordinary names use targets.resolve provider='onec'. Search results may contain serial_id. If the user asks where that exact physical item is now, pass that returned serial_id to onec.get_stock.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [
"text"
],
"additionalProperties": false,
"properties": {
"text": {
"type": "string",
"minLength": 1,
"description": "Free text to search in indexed 1C data."
}
}
}onec.get_stockonec.stock.read
Read current 1C stock using exact GUIDs. Accepts warehouse_id, nomenclature_id and/or serial_id. Resolve human warehouse/nomenclature names exactly once with targets.resolve provider='onec'. For a physical item found by free-text document search, reuse serial_id returned by onec.search to find its CURRENT warehouse. Do not infer the current warehouse from an old document. Optional *_name fields are display only.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [],
"additionalProperties": false,
"properties": {
"warehouse_id": {
"type": "string",
"minLength": 1
},
"nomenclature_id": {
"type": "string",
"minLength": 1
},
"serial_id": {
"type": "string",
"minLength": 1,
"description": "Exact serial-number GUID returned by onec.search."
},
"warehouse_name": {
"type": "string",
"minLength": 1
},
"nomenclature_name": {
"type": "string",
"minLength": 1
}
}
}onec.get_movementsonec.movements.read
Read 1C inventory movement history for exact warehouse and/or nomenclature GUIDs. Resolve human names exactly once with targets.resolve provider='onec' and pass the resolved target.id directly here; when the resolver returned RESOLVED, do not search again. Optional date_from/date_to use YYYY-MM-DD and are inclusive.
Registration: RiskLevel.READ / ApprovalMode.NEVER · enabled
ExecutionRequest to the provider backend; ExecutionResult carries normalized data/error/status and provider metadata. Runtime RBAC can raise deny or force approval even where metadata says NEVER/POLICY; static metadata is not final policy.
Exact input schema
{
"type": "object",
"required": [],
"additionalProperties": false,
"properties": {
"warehouse_id": {
"type": "string",
"minLength": 1
},
"nomenclature_id": {
"type": "string",
"minLength": 1
},
"warehouse_name": {
"type": "string",
"minLength": 1
},
"nomenclature_name": {
"type": "string",
"minLength": 1
},
"date_from": {
"type": "string",
"minLength": 10,
"description": "Inclusive start date in YYYY-MM-DD format."
},
"date_to": {
"type": "string",
"minLength": 10,
"description": "Inclusive end date in YYYY-MM-DD format."
}
}
}Module metadata#
Configure and test service access#
- Have the 1C service maintainer confirm the HTTP base URL, supported schema/query paths and permitted data.
- Configure
CONTROLHUB_ONEC_BASE_URL,CONTROLHUB_ONEC_INFOBASE_ID, the display name and authorized credentials using the supported settings. - Retain the deployment’s verified TLS configuration and inspect service health.
- Test schema discovery or a small supported lookup, then assign the corresponding read permissions.
- Ask for a known item and inspect its identity before requesting stock or movements.
If schema/query support is unavailable, report that missing contract to the service maintainer. Do not substitute direct SQL or invented HTTP paths. Review large-table descriptors, date/warehouse context and truncation before treating the output as a complete report.
Permissions, approvals and service boundaries#
All eleven tools are READ / NEVER registrations with separate schema, query, health, warehouse, item, image, document-text, search, stock and movement permissions. Runtime policy can still deny or require approval; the service's own identity must also permit the data. A read-only HTTP POST query is still a read operation, not permission to modify business records.
The configured service URL and its published paths belong to your 1C deployment. They are not public execution URLs on yaadmin.io. Basic credentials, TLS verification and service compatibility must be configured by the 1C maintainer. Additional verified settings include CONTROLHUB_ONEC_USERNAME, CONTROLHUB_ONEC_PASSWORD and CONTROLHUB_ONEC_VERIFY_TLS. Keep credentials out of prompts.
Example: report stock for a category in one warehouse#
- Resolve the named warehouse to an exact real GUID.
- Use
onec.find_itemswith meaningful separate category terms; read every available page and inspect relevance. - Pass all relevant returned item GUIDs and the warehouse GUID to
onec.get_stock_summary. - Review completeness, zero-stock entries and units. Do not combine different units into a misleading total.
- If a result is offloaded, inspect the stored table and use Files & Tables for further authorized analysis. A truncated search cannot support an exhaustive total.
Example: build a report from the available schema#
- List sources with
onec.describe_schema, then inspect the selected source's detailed schema. - Construct
planusing only that source's real fields and allowed operators. Document lines require the actual tabular-part source and exposed parent fields; do not invent joins. - Use
onec.querywith a bounded page or server aggregate. For exhaustive results, follow pagination untilhas_more=false. - Read warnings and completeness indicators before interpreting zero results. Missing schema/query support needs a service update, not guessed SQL.
Result limits and troubleshooting#
The universal client rejects responses above 8 MiB. The published query plan limits include 50 selected fields, 40 filters, 20 grouping fields, 12 aggregates, 10 ordering entries and a page size up to 200. Metadata must also permit the selected operations. These bounds do not establish that every source or aggregate exists in your service.
Large-report offload is opt-in and presentation-dependent. Rows can be stored before model history while descriptors/summary are returned; this does not apply universally to all JSON. Review missing-service errors, pagination, legacy truncation and provider access before concluding that a business record is absent. No write tool, direct SQL driver or database performance repair is established.
Further reading#
Module setup · Roles and permissions · Troubleshooting · Available modules