MCP Control
Каталог · Чтение

Каталог · Поиск соответствия · Товары · Строки

catalog_resolve_product_lines
Синяя керамическая кружка

Попробуйте три запроса

Получить данные
  1. Вы указываетеФилиал
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «Каталог / Поиск соответствия / Товары / Строки» выполни чтение по выбранной записи (филиал). Выведи кратко: lines, ready.
Что искать в ответе
lines
Поле ответа
ready
Поле ответа
ocrPerformed
Поле ответа
Задать параметры
  1. Вы указываетеФилиал
  2. ПомощникСверка выбора
  3. Вы получаетеТочный объект
Запрос в чат
Покажи, как получить «Каталог / Поиск соответствия / Товары / Строки» на учебном примере с purpose = order. Объясни, какие ещё данные нужны и как будет выглядеть ответ.
Фрагмент учебных параметров
purpose
order
locationId
DEMO-101
language
ru
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Каталог / Поиск соответствия / Товары / Строки» объясни lines, ready. Отметь отсутствующие значения.
Поля для проверки
lines
Поле ответа
ready
Поле ответа
ocrPerformed
Поле ответа
Как работает действие

Это чтение. Выберите запись или задайте фильтры в доступной компании.

Описание разработчика

Resolve an order list or supplier invoice already transcribed by the AI client. Filter each product name before pagination, return at most three candidates per source row, and broaden only missing rows within authorized company/location scope. Distinguishes exact, ambiguous, unavailable and missing matches. Never loads the full catalog into the AI, performs OCR, changes stock or creates an order.

Параметры запроса
lines
Up to 50 source rows. Chunk a longer list without dropping or silently merging rows. обязательно по схеме · array · до элементов 50
locationId
Идентификатор точки из текущего подключения. необязательно · string · до символов 128
language
Язык результата или локализуемого значения согласно схеме. обязательно по схеме · string · по умолчанию "en"
fallbackLanguages
Only tried for rows absent from the primary scoped search. обязательно по схеме · array · по умолчанию [] · до элементов 3
purpose
An order requires an available product; a receipt may replenish a disabled product. обязательно по схеме · string · по умолчанию "order" · варианты order, receipt
candidateLimit
Small bounded candidate page per row; ambiguous matches must be selected explicitly. обязательно по схеме · integer · по умолчанию 3 · минимум 1 · максимум 3
Что вернёт команда
lines
One result per input row in the original order. обязательно по схеме · array · до элементов 50
ready
True only if every row has one eligible exact match; pricing, stock, invoice arithmetic and fulfillment still require validation. обязательно по схеме · boolean
ocrPerformed
The AI client reads the image; this Action only searches canonical product names. обязательно по схеме · boolean
Поля и технические схемы
Входные поля и поля ответа catalog_resolve_product_lines
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "lines": {
      "minItems": 1,
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lineKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_~:@+.-]+$",
            "description": "Caller source-row key, preserved unchanged so repeated names and quantities remain traceable."
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 160,
            "description": "Product name extracted by the AI client from the original list or image; no OCR runs in MCP."
          },
          "fallbackNames": {
            "default": [],
            "description": "Optional AI-extracted alternate name filters; no unfiltered catalog scan occurs.",
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 2,
              "maxLength": 160,
              "description": "Alternate spelling or a narrower meaningful name filter, used only when the primary scoped search is empty."
            }
          }
        },
        "required": [
          "lineKey",
          "name",
          "fallbackNames"
        ],
        "additionalProperties": false
      },
      "description": "Up to 50 source rows. Chunk a longer list without dropping or silently merging rows."
    },
    "locationId": {
      "description": "Requested establishment; primary searches stay here. Broader results are marked ineligible when they cannot be used here.",
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$"
    },
    "language": {
      "default": "en",
      "description": "Language for the primary product-name filter.",
      "type": "string",
      "pattern": "^[a-z]{2,3}(?:-[A-Z]{2})?$"
    },
    "fallbackLanguages": {
      "default": [],
      "description": "Only tried for rows absent from the primary scoped search.",
      "maxItems": 3,
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z]{2,3}(?:-[A-Z]{2})?$",
        "description": "Another known company catalog language."
      }
    },
    "purpose": {
      "default": "order",
      "description": "An order requires an available product; a receipt may replenish a disabled product.",
      "type": "string",
      "enum": [
        "order",
        "receipt"
      ]
    },
    "candidateLimit": {
      "default": 3,
      "description": "Small bounded candidate page per row; ambiguous matches must be selected explicitly.",
      "type": "integer",
      "minimum": 1,
      "maximum": 3
    }
  },
  "required": [
    "lines",
    "language",
    "fallbackLanguages",
    "purpose",
    "candidateLimit"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "lines": {
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "lineKey": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_~:@+.-]+$",
            "description": "Unchanged input source-row key."
          },
          "name": {
            "type": "string",
            "minLength": 2,
            "maxLength": 160,
            "description": "Unchanged source product name."
          },
          "status": {
            "type": "string",
            "enum": [
              "matched",
              "ambiguous",
              "not_found",
              "unavailable"
            ],
            "description": "matched requires one exact normalized eligible candidate and a complete bounded search; never commits an order."
          },
          "matchedProductId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_~:@+.-]+$"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact uniquely matched eligible product, or null. Review candidates before preparing a write."
          },
          "candidates": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "pattern": "^[A-Za-z0-9_~:@+.-]+$",
                  "description": "Canonical product ID from the existing authorized product search."
                },
                "name": {
                  "type": "string",
                  "maxLength": 160,
                  "description": "Bounded localized catalog name."
                },
                "type": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Stored product type."
                },
                "unit": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 100
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Stored unit; no unit conversion is performed."
                },
                "price": {
                  "description": "Stored base price; native order pricing remains authoritative.",
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "available": {
                  "description": "Stored availability flag.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "eligibleAtLocation": {
                  "type": "boolean",
                  "description": "Whether this result is eligible at the requested establishment."
                },
                "eligibleForPurpose": {
                  "type": "boolean",
                  "description": "Availability and establishment eligibility; does not prove stock or booking availability."
                }
              },
              "required": [
                "id",
                "name",
                "type",
                "unit",
                "price",
                "available",
                "eligibleAtLocation",
                "eligibleForPurpose"
              ],
              "additionalProperties": false
            },
            "description": "Only small authorized name-filtered candidates."
          },
          "hasMore": {
            "type": "boolean",
            "description": "More candidates exist; narrow the name filter or use catalog_search_products pagination before choosing."
          },
          "searchScope": {
            "type": "string",
            "enum": [
              "location",
              "company"
            ],
            "description": "Broader company search still uses the same account and connection authorization."
          },
          "usedFallback": {
            "type": "boolean",
            "description": "Whether a missing primary result required alternate name/language or broader authorized search."
          }
        },
        "required": [
          "lineKey",
          "name",
          "status",
          "matchedProductId",
          "candidates",
          "hasMore",
          "searchScope",
          "usedFallback"
        ],
        "additionalProperties": false
      },
      "description": "One result per input row in the original order."
    },
    "ready": {
      "type": "boolean",
      "description": "True only if every row has one eligible exact match; pricing, stock, invoice arithmetic and fulfillment still require validation."
    },
    "ocrPerformed": {
      "type": "boolean",
      "const": false,
      "description": "The AI client reads the image; this Action only searches canonical product names."
    }
  },
  "required": [
    "lines",
    "ready",
    "ocrPerformed"
  ],
  "additionalProperties": false
}