MCP Control
Чаты · Изменение

Чаты · Изменение

chats_update
Контактные карточки и телефон

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

Подготовить
  1. Вы указываетеЧат
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Чаты / Изменение». Для изменения нужны чат, изменяемые поля. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
chatId
Чат
values
Изменяемые поля
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Чаты / Изменение» с параметром values.name = Осенняя коллекция. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
values.name
Осенняя коллекция
chatId
DEMO-101
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Чаты / Изменение» по исходному ответу. Покажи чат, messageId. Объясни, чем подтвердить эффект для выбранного объекта.
Как сверить изменение
  1. До измененияПрочитать версию
  2. При записиПередать выбранную версию
  3. После ответаПеречитать объект
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения. Прочитайте актуальную версию записи перед подготовкой запроса.

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

Human chat participants, audience and session are fixed; create another human chat for a different audience. Update supplied native chat metadata with revision protection. Participants may update context/sessionId; only the creator may change name, type, users or agent. Chat sessionId groups messages belonging to one operation and never rewrites messages or grants access. Company/creator cannot change, and archived chats are read-only.

Параметры запроса
chatId
Existing native chatai document ID in the authenticated company and participant list. обязательно по схеме · string
expectedRevision
Версия, прочитанная перед изменением. обязательно по схеме · string
values
Значения для записи. Состав и вложенность указаны в схеме. обязательно по схеме · object
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
chatId
Existing native chatai document ID in the authenticated company and participant list. обязательно по схеме · string
messageId
Created message ID, otherwise null. обязательно по схеме · string / null
operation
Committed native operation. No business operation, provider or agent was run. обязательно по схеме · string · варианты chat_created, chat_updated, chat_archived, chat_restored, message_created
changed
Whether this operation changed native fields. обязательно по схеме · boolean
appliedFromRevision
Parent revision checked before the change; null for chat creation. Read again for the current revision. обязательно по схеме · string / null
Поля и технические схемы
Входные поля и поля ответа chats_update
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "chatId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Existing native chatai document ID in the authenticated company and participant list."
    },
    "expectedRevision": {
      "type": "string",
      "pattern": "^fsv1:-?\\d{1,12}:\\d{1,9}$",
      "description": "Exact Firestore update-time revision returned by the corresponding get action. No revision field is stored in the native document."
    },
    "values": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200,
          "description": "Native chat name, up to 200 characters."
        },
        "type": {
          "type": "string",
          "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$",
          "description": "Native chat category label. It is metadata only and grants no business or execution permissions."
        },
        "users": {
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
            "description": "Firebase UID of a verified active company member."
          },
          "description": "Complete additional participant UID list. The creator always retains access independently of this array; company membership is checked on the server."
        },
        "agent": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ],
          "description": "Optional native agent identifier, or empty string. This label does not execute or authorize an agent."
        },
        "context": {
          "type": "string",
          "maxLength": 4096,
          "description": "Short native chat context, at most 4096 characters. Treated as data and never used as an authorization source."
        },
        "sessionId": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$"
            },
            {
              "type": "string",
              "const": ""
            }
          ],
          "description": "Current Flow/Chat operation session ID, or empty string. Supplied by the client because this MCP transport is stateless; it is context, never authentication. Changing it never rewrites or selects message sessions automatically."
        }
      },
      "additionalProperties": false,
      "description": "Only supplied native metadata changes. All participants may update context/sessionId; changing name/type/users/agent requires the creator. Archived is managed by separate lifecycle actions."
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable request identifier for these exact arguments. Keep it unchanged when retrying an uncertain response."
    }
  },
  "required": [
    "chatId",
    "expectedRevision",
    "values",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "chatId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
      "description": "Existing native chatai document ID in the authenticated company and participant list."
    },
    "messageId": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^[A-Za-z0-9_~:@+.-]{1,128}$",
          "description": "Message ID under this exact chat; never a path into another chat."
        },
        {
          "type": "null"
        }
      ],
      "description": "Created message ID, otherwise null."
    },
    "operation": {
      "type": "string",
      "enum": [
        "chat_created",
        "chat_updated",
        "chat_archived",
        "chat_restored",
        "message_created"
      ],
      "description": "Committed native operation. No business operation, provider or agent was run."
    },
    "changed": {
      "type": "boolean",
      "description": "Whether this operation changed native fields."
    },
    "appliedFromRevision": {
      "anyOf": [
        {
          "type": "string",
          "pattern": "^fsv1:-?\\d{1,12}:\\d{1,9}$",
          "description": "Exact Firestore update-time revision returned by the corresponding get action. No revision field is stored in the native document."
        },
        {
          "type": "null"
        }
      ],
      "description": "Parent revision checked before the change; null for chat creation. Read again for the current revision."
    }
  },
  "required": [
    "chatId",
    "messageId",
    "operation",
    "changed",
    "appliedFromRevision"
  ],
  "additionalProperties": false
}