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#
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. Example for computer mice: 'миша', 'мышь', 'mouse'; for others 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 (e.g. 'тимчас'; 'злам', 'слом', 'несправ'). 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."
}
}
}