Перейти к содержимому
LegalStack

1С

Инструменты раздела «1С»: 13

Подключение: https://mcp.legalstack.ru/mcp/onec или в составе общего подключения https://mcp.legalstack.ru/mcp.

Создать контрагента в 1С

create_onec_counterparty · изменяет данные

Описание для модели: Create a counterparty in 1C or return the existing one. When a counterparty with the same tax number exists it is returned with created false.

Параметры

ПараметрТипОбязательныйОписание
namestringдаShort name, such as Ромашка ООО. Длина: 1–150.
full_namestringнетFull legal name. Длина: 1–1000.
innstringнетTax number, 10 digits for a company or 12 for a person.
kppstringнетKPP of a company, 9 digits.
individualbooleanнетTrue for a person or sole trader, a company by default.
group_keystringнетRef_Key of the group of counterparties, a GUID.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 150,
      "description": "Short name, such as Ромашка ООО"
    },
    "full_name": {
      "description": "Full legal name",
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    },
    "inn": {
      "description": "Tax number, 10 digits for a company or 12 for a person",
      "type": "string",
      "pattern": "^\\d{10}(\\d{2})?$"
    },
    "kpp": {
      "description": "KPP of a company, 9 digits",
      "type": "string",
      "pattern": "^\\d{9}$"
    },
    "individual": {
      "description": "True for a person or sole trader, a company by default",
      "type": "boolean"
    },
    "group_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the group of counterparties, a GUID"
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}

Создать запись в 1С

create_onec_record · изменяет данные

Описание для модели: Create a record in any 1C resource. Field names come from describe_onec_resource. Reference fields take a Ref_Key, tables take a list of rows. Documents are created without posting.

Параметры

ПараметрТипОбязательныйОписание
resourcestringдаName of a 1C resource from list_onec_resources, such as Catalog_Контрагенты. Длина: 1–200.
dataобъектдаValues of fields by name.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "resource": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[\\p{L}\\p{N}_]+$",
      "description": "Name of a 1C resource from list_onec_resources, such as Catalog_Контрагенты"
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "description": "Values of fields by name"
    }
  },
  "required": [
    "resource",
    "data"
  ],
  "additionalProperties": false
}

Создать реализацию в 1С

create_onec_sale · изменяет данные

Описание для модели: Create a sale of goods and services document in 1C. The document is created without posting, the accountant posts it in 1C. Sums and VAT are calculated from quantity, price and rate.

Параметры

ПараметрТипОбязательныйОписание
datestringдаDate of the document, YYYY-MM-DD or YYYY-MM-DDTHH:MM.
organization_keystringдаRef_Key of the own organization from list_onec_organizations, a GUID.
counterparty_keystringдаRef_Key of the counterparty, a GUID.
contract_keystringнетRef_Key of the contract from find_onec_contracts, a GUID.
operationstringнетKind of the operation, services by default. Значения: Услуги, Товары.
vat_includedbooleanнетTrue when prices already include VAT, true by default.
linesмассив объектовдаLines of the document. Элементов: 1–200.
lines[].item_keystringдаRef_Key of the item from find_onec_items, a GUID.
lines[].contentstringнетText of the service line, the item name by default. Длина: 1–1000.
lines[].quantitynumberдаQuantity.
lines[].pricenumberдаPrice of one unit. Диапазон: от 0.
lines[].vatstringдаVAT rate. Значения: 22%, 20%, 10%, 7%, 5%, 0%, Без НДС.
commentstringнетComment of the document. Длина: 1–1000.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "date": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}(:\\d{2})?)?$",
      "description": "Date of the document, YYYY-MM-DD or YYYY-MM-DDTHH:MM"
    },
    "organization_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the own organization from list_onec_organizations, a GUID"
    },
    "counterparty_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the counterparty, a GUID"
    },
    "contract_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the contract from find_onec_contracts, a GUID"
    },
    "operation": {
      "type": "string",
      "enum": [
        "Услуги",
        "Товары"
      ],
      "description": "Kind of the operation, services by default"
    },
    "vat_included": {
      "description": "True when prices already include VAT, true by default",
      "type": "boolean"
    },
    "lines": {
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "item_key": {
            "type": "string",
            "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
            "description": "Ref_Key of the item from find_onec_items, a GUID"
          },
          "content": {
            "description": "Text of the service line, the item name by default",
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "quantity": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Quantity"
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "description": "Price of one unit"
          },
          "vat": {
            "type": "string",
            "enum": [
              "22%",
              "20%",
              "10%",
              "7%",
              "5%",
              "0%",
              "Без НДС"
            ],
            "description": "VAT rate"
          }
        },
        "required": [
          "item_key",
          "quantity",
          "price",
          "vat"
        ],
        "additionalProperties": false
      },
      "description": "Lines of the document"
    },
    "comment": {
      "description": "Comment of the document",
      "type": "string",
      "minLength": 1,
      "maxLength": 1000
    }
  },
  "required": [
    "date",
    "organization_key",
    "counterparty_key",
    "lines"
  ],
  "additionalProperties": false
}

Пометить запись 1С на удаление

delete_onec_record · изменяет данные

Описание для модели: Mark a 1C record for deletion as 1C users do. The record stays in the base until an administrator removes marked records. Unmark it with update_onec_record and DeletionMark false.

Параметры

ПараметрТипОбязательныйОписание
resourcestringдаName of a 1C resource from list_onec_resources, such as Catalog_Контрагенты. Длина: 1–200.
ref_keystringдаRef_Key of the record, a GUID.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "resource": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[\\p{L}\\p{N}_]+$",
      "description": "Name of a 1C resource from list_onec_resources, such as Catalog_Контрагенты"
    },
    "ref_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the record, a GUID"
    }
  },
  "required": [
    "resource",
    "ref_key"
  ],
  "additionalProperties": false
}

Структура раздела 1С

describe_onec_resource · только чтение

Описание для модели: Describe fields and tables of a 1C resource. Fields ending with _Key hold a Ref_Key of another record. Tables are the tabular parts of a document or catalog, such as goods or services.

Параметры

ПараметрТипОбязательныйОписание
resourcestringдаName of a 1C resource from list_onec_resources, such as Catalog_Контрагенты. Длина: 1–200.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "resource": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[\\p{L}\\p{N}_]+$",
      "description": "Name of a 1C resource from list_onec_resources, such as Catalog_Контрагенты"
    }
  },
  "required": [
    "resource"
  ],
  "additionalProperties": false
}

Договоры в 1С

find_onec_contracts · только чтение

Описание для модели: Find contracts with counterparties in 1C.

Параметры

ПараметрТипОбязательныйОписание
counterparty_keystringнетRef_Key of the counterparty, a GUID.
querystringнетPart of the contract name. Длина: 1–200.
limitintegerнетMaximum number of items to return, 20 by default. По умолчанию: 20. Диапазон: 1–100.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "counterparty_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the counterparty, a GUID"
    },
    "query": {
      "description": "Part of the contract name",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of items to return, 20 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "additionalProperties": false
}

Контрагенты 1С

find_onec_counterparties · только чтение

Описание для модели: Find counterparties in 1C by name or tax number. A query of 10 or 12 digits searches by tax number exactly, other text searches the name.

Параметры

ПараметрТипОбязательныйОписание
querystringдаPart of the name or the full tax number. Длина: 1–200.
limitintegerнетMaximum number of items to return, 20 by default. По умолчанию: 20. Диапазон: 1–100.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Part of the name or the full tax number"
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of items to return, 20 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "query"
  ],
  "additionalProperties": false
}

Номенклатура 1С

find_onec_items · только чтение

Описание для модели: Find goods and services in the 1C item catalog.

Параметры

ПараметрТипОбязательныйОписание
querystringнетPart of the item name. Длина: 1–200.
limitintegerнетMaximum number of items to return, 20 by default. По умолчанию: 20. Диапазон: 1–100.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "query": {
      "description": "Part of the item name",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of items to return, 20 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "additionalProperties": false
}

Запись 1С

get_onec_record · только чтение

Описание для модели: Get one record of a 1C resource with all its fields.

Параметры

ПараметрТипОбязательныйОписание
resourcestringдаName of a 1C resource from list_onec_resources, such as Catalog_Контрагенты. Длина: 1–200.
ref_keystringдаRef_Key of the record, a GUID.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "resource": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[\\p{L}\\p{N}_]+$",
      "description": "Name of a 1C resource from list_onec_resources, such as Catalog_Контрагенты"
    },
    "ref_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the record, a GUID"
    }
  },
  "required": [
    "resource",
    "ref_key"
  ],
  "additionalProperties": false
}

Организации в 1С

list_onec_organizations · только чтение

Описание для модели: List own organizations kept in the 1C database.

Параметры

Параметров нет.

JSON Schema параметров
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Разделы базы 1С

list_onec_resources · только чтение

Описание для модели: List catalogs, documents and registers of the 1C database. A resource name is used by the other 1C tools. See its fields with describe_onec_resource.

Параметры

ПараметрТипОбязательныйОписание
querystringнетPart of the resource name. Длина: 1–200.
kindstringнетKind of resources. Значения: Справочник, Документ, Журнал документов, Регистр сведений, Регистр накопления, Регистр бухгалтерии, Регистр расчёта, План счетов, План видов характеристик, План видов расчёта, План обмена, Бизнес-процесс, Задача, Константа.
limitintegerнетMaximum number of items to return, 100 by default. По умолчанию: 100. Диапазон: 1–500.
offsetintegerнетNumber of items to skip, for paging. По умолчанию: 0. Диапазон: 0–9007199254740991.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "query": {
      "description": "Part of the resource name",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "kind": {
      "type": "string",
      "enum": [
        "Справочник",
        "Документ",
        "Журнал документов",
        "Регистр сведений",
        "Регистр накопления",
        "Регистр бухгалтерии",
        "Регистр расчёта",
        "План счетов",
        "План видов характеристик",
        "План видов расчёта",
        "План обмена",
        "Бизнес-процесс",
        "Задача",
        "Константа"
      ],
      "description": "Kind of resources"
    },
    "limit": {
      "default": 100,
      "description": "Maximum number of items to return, 100 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "default": 0,
      "description": "Number of items to skip, for paging",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "additionalProperties": false
}

Выборка записей 1С

query_onec_records · только чтение

Описание для модели: Query records of any 1C resource with an OData filter. filter uses OData v3: Description eq 'Name', substringof('part', Description), Date ge datetime'2026-01-01T00:00:00', Owner_Key eq guid'...'. Quote strings with single quotes and double a quote inside.

Параметры

ПараметрТипОбязательныйОписание
resourcestringдаName of a 1C resource from list_onec_resources, such as Catalog_Контрагенты. Длина: 1–200.
filterstringнетOData $filter expression. Длина: 1–4000.
fieldsмассив stringнетFields to return, all by default. Элементов: 1–100.
order_bystringнетOData $orderby, such as Date desc. Длина: 1–500.
limitintegerнетMaximum number of items to return, 50 by default. По умолчанию: 50. Диапазон: 1–500.
offsetintegerнетNumber of items to skip, for paging. По умолчанию: 0. Диапазон: 0–9007199254740991.
with_totalbooleanнетTrue also counts all matching records.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "resource": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[\\p{L}\\p{N}_]+$",
      "description": "Name of a 1C resource from list_onec_resources, such as Catalog_Контрагенты"
    },
    "filter": {
      "description": "OData $filter expression",
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "fields": {
      "description": "Fields to return, all by default",
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      }
    },
    "order_by": {
      "description": "OData $orderby, such as Date desc",
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "limit": {
      "default": 50,
      "description": "Maximum number of items to return, 50 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "offset": {
      "default": 0,
      "description": "Number of items to skip, for paging",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "with_total": {
      "description": "True also counts all matching records",
      "type": "boolean"
    }
  },
  "required": [
    "resource"
  ],
  "additionalProperties": false
}

Изменить запись в 1С

update_onec_record · изменяет данные

Описание для модели: Change fields or tables of a record in 1C. Listed fields change, others stay. A table given here replaces all its rows.

Параметры

ПараметрТипОбязательныйОписание
resourcestringдаName of a 1C resource from list_onec_resources, such as Catalog_Контрагенты. Длина: 1–200.
ref_keystringдаRef_Key of the record, a GUID.
dataобъектдаNew values of fields by name.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "resource": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[\\p{L}\\p{N}_]+$",
      "description": "Name of a 1C resource from list_onec_resources, such as Catalog_Контрагенты"
    },
    "ref_key": {
      "type": "string",
      "pattern": "^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$",
      "description": "Ref_Key of the record, a GUID"
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {},
      "description": "New values of fields by name"
    }
  },
  "required": [
    "resource",
    "ref_key",
    "data"
  ],
  "additionalProperties": false
}

На этой странице