Чаты · Изменение
Чаты · Создание
chats_create
Попробуйте три запроса
Подготовить
- Вы указываетеСессия
- ПомощникПодготовка
- Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Чаты / Создание». Для изменения нужны название, тип. Покажи объект и ожидаемый эффект до выполнения.
- name
- Название
- type
- Тип
- users
- Параметр
Применить
- Вы указываетеСогласованные значения
- ПомощникОдин вызов
- Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Чаты / Создание» с параметром visibility = company. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
- visibility
- company
- name
- Осенняя коллекция
Проверить итог
- Вы указываетеИсходный ответ
- ПомощникСверка результата
- Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Чаты / Создание» по исходному ответу. Покажи чат, messageId. Объясни, чем подтвердить эффект для выбранного объекта.
- ЗапросСохранить исходный ключ
- ОтветПроверить статус
- ПроверкаСверить эффект операции
Как работает действие
Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.
Описание разработчика
Create or reopen a human chat with type=internal and visibility=company or participants; its messages use the shared root message collection. Omit visibility for existing AI/Flow chat protocols. Create a native active chat for the authenticated creator and server-verified company participants. Stores only the existing chatai fields; does not execute an agent, change grants, send external messages or create business records.
Параметры запроса
- name
- Native chat name, up to 200 characters. обязательно по схеме · string · до символов 200
- visibility
- For human internal chats, company is shared with staff and participants is private. Omit for existing AI/Flow chats. необязательно · string · варианты company, participants
- type
- Native chat category label. It is metadata only and grants no business or execution permissions. обязательно по схеме · string · по умолчанию "chat"
- users
- Complete additional participant UID list. The creator always retains access independently of this array; company membership is checked on the server. обязательно по схеме · array · по умолчанию [] · до элементов 50
- agent
- Optional native agent identifier, or empty string. This label does not execute or authorize an agent. обязательно по схеме · string / string · по умолчанию ""
- context
- Short native chat context, at most 4096 characters. Treated as data and never used as an authorization source. обязательно по схеме · string · по умолчанию "" · до символов 4096
- sessionId
- 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. обязательно по схеме · string / string · по умолчанию ""
- 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
Поля и технические схемы

Вход · JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Native chat name, up to 200 characters."
},
"visibility": {
"description": "For human internal chats, company is shared with staff and participants is private. Omit for existing AI/Flow chats.",
"type": "string",
"enum": [
"company",
"participants"
]
},
"type": {
"default": "chat",
"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": {
"default": [],
"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": {
"default": "",
"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": {
"default": "",
"type": "string",
"maxLength": 4096,
"description": "Short native chat context, at most 4096 characters. Treated as data and never used as an authorization source."
},
"sessionId": {
"default": "",
"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."
},
"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": [
"name",
"type",
"users",
"agent",
"context",
"sessionId",
"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
}