MCP Site
site_visual_customizer

Настроить визуальный конструктор товара

Совмещает слои изображений, текст и варианты модификаторов для предпросмотра товара.

С изменениями

Примеры промптов

Запрос в чат
Подготовь конструктор футболки с двумя цветами и текстовой надписью. Используй реальные варианты каталога и покажи предпросмотр.
Что проверить в ответе

Совмещает слои изображений, текст и варианты модификаторов для предпросмотра товара.

Запрос в чат
Для задачи «Настроить визуальный конструктор товара» сравни режимы contract и get инструмента site_visual_customizer. Какой подойдёт в моём случае и какие данные нужно подготовить?
Что проверить в ответе

Сопоставить два режима и их аргументы.

Запрос в чат
При выполнении «Настроить визуальный конструктор товара» связь прервалась после отправки. Для site_visual_customizer проверь исходный ключ операции и текущее состояние объекта перед решением о повторе.
Что проверить в ответе

Сопоставить результат с исходной операцией.

Как проходит вызов
Вход: siteId, operation, productId. Результат: данные операции.
Как уточнить расплывчатый запрос
Сделай красиво.

Назовите материал, формат и вид результата, который хотите согласовать.

Подготовь конструктор футболки с двумя цветами и текстовой надписью. Используй реальные варианты каталога и покажи предпросмотр.

Параметры запроса
siteId
Идентификатор сайта из списка доступных сайтов. строка · обязательно по схеме
operation
Выбранный режим инструмента. contract, get, preview, save · обязательно по схеме
productId
строка · необязательно
selection
объект · необязательно
expectedRevision
Актуальная ревизия объекта перед изменением. целое число · необязательно · от 0 · до 9007199254740991
idempotencyKey
Ключ одной операции. При повторе с теми же данными сохраните ключ. строка · необязательно
config
объект · необязательно
Что вернёт инструмент

Состав объекта зависит от операции. Проверьте фактический ответ и полную схему.

Пример аргументов JSON

Учебные значения. Для вызова подставьте идентификаторы и ревизию из своего подключения.

{
  "operation": "contract",
  "siteId": "site_demo"
}
Полная схема MCP

Вход

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "siteId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
    },
    "operation": {
      "type": "string",
      "enum": [
        "contract",
        "get",
        "preview",
        "save"
      ],
      "description": "contract reads integration instructions; get/preview require productId; save requires productId, config, expectedRevision and idempotencyKey."
    },
    "productId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
    },
    "selection": {
      "type": "object",
      "properties": {
        "revision": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "choices": {
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{0,39}$"
          },
          "additionalProperties": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{0,39}$"
          }
        },
        "text": {
          "default": {},
          "type": "object",
          "propertyNames": {
            "type": "string",
            "pattern": "^[a-z][a-z0-9_-]{0,39}$"
          },
          "additionalProperties": {
            "type": "string",
            "maxLength": 80,
            "pattern": "^[^<>\\x00-\\x1f\\x7f]*$"
          }
        }
      },
      "required": [
        "revision",
        "choices",
        "text"
      ],
      "additionalProperties": false
    },
    "expectedRevision": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "idempotencyKey": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$"
    },
    "config": {
      "type": "object",
      "properties": {
        "title": {
          "type": "string",
          "minLength": 1,
          "maxLength": 100,
          "pattern": "^[^<>\\x00-\\x1f]*$"
        },
        "enabled": {
          "default": false,
          "type": "boolean"
        },
        "baseMediaId": {
          "type": "string",
          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
        },
        "width": {
          "type": "integer",
          "minimum": 100,
          "maximum": 4096
        },
        "height": {
          "type": "integer",
          "minimum": 100,
          "maximum": 4096
        },
        "groups": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[^<>\\x00-\\x1f]*$"
              },
              "required": {
                "default": true,
                "type": "boolean"
              },
              "defaultChoiceId": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$"
              },
              "choices": {
                "minItems": 1,
                "maxItems": 12,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^[a-z][a-z0-9_-]{0,39}$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "pattern": "^[^<>\\x00-\\x1f]*$"
                    },
                    "mediaId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
                    },
                    "modifier": {
                      "type": "object",
                      "properties": {
                        "optionSetId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
                        },
                        "productId": {
                          "type": "string",
                          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
                        }
                      },
                      "required": [
                        "optionSetId",
                        "productId"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "id",
                    "label"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "id",
              "label",
              "required",
              "choices"
            ],
            "additionalProperties": false
          }
        },
        "textFields": {
          "default": [],
          "maxItems": 4,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z][a-z0-9_-]{0,39}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100,
                "pattern": "^[^<>\\x00-\\x1f]*$"
              },
              "required": {
                "default": false,
                "type": "boolean"
              },
              "maxLength": {
                "type": "integer",
                "minimum": 1,
                "maximum": 80
              },
              "x": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "y": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "fontSize": {
                "type": "number",
                "minimum": 1,
                "maximum": 20
              },
              "color": {
                "type": "string",
                "pattern": "^#[a-fA-F0-9]{6}$"
              },
              "fontFamily": {
                "default": "sans-serif",
                "type": "string",
                "enum": [
                  "sans-serif",
                  "serif",
                  "monospace"
                ]
              },
              "align": {
                "default": "middle",
                "type": "string",
                "enum": [
                  "start",
                  "middle",
                  "end"
                ]
              }
            },
            "required": [
              "id",
              "label",
              "required",
              "maxLength",
              "x",
              "y",
              "fontSize",
              "color",
              "fontFamily",
              "align"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "title",
        "enabled",
        "baseMediaId",
        "width",
        "height",
        "groups",
        "textFields"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "siteId",
    "operation"
  ],
  "additionalProperties": false
}

Ответ

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "propertyNames": {
    "type": "string"
  },
  "additionalProperties": {
    "$ref": "#/$defs/__schema0"
  },
  "$defs": {
    "__schema0": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/__schema0"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/__schema0"
          }
        }
      ]
    }
  }
}
Открыть JSON карточки

Из этого раздела