MCP Control
Коммуникации · Чтение

Диалоги · Сообщения

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

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

Получить данные
  1. Вы указываетеДиалог
  2. ПомощникЧтение
  3. Вы получаетеПоля ответа
Запрос в чат
Для задачи «Диалоги / Сообщения» выполни чтение по выбранной записи (диалог). Выведи кратко: список позиций, следующая страница.
Что искать в ответе
items
Список позиций
nextCursor
Следующая страница
Следующая страница
  1. Вы указываетеПредыдущий ответ
  2. ПомощникПродолжение
  3. Вы получаетеСледующая страница
Запрос в чат
Продолжи «Диалоги / Сообщения» с позиции прошлого ответа. Сохрани фильтры и размер страницы 3. Покажи новые строки отдельно.
Как листать выдачу
Страница 1До 3 строк
Страница 2Продолжение
Разобрать ответ
  1. Вы указываетеПолученный ответ
  2. ПомощникРазбор значений
  3. Вы получаетеКраткое пояснение
Запрос в чат
На основании уже полученного ответа «Диалоги / Сообщения» объясни список позиций, следующая страница. Отметь отсутствующие значения.
Поля для проверки
items
Список позиций
nextCursor
Следующая страница
Как работает действие

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

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

Read messages belonging to an exact existing conversation_key returned by messages_search. Messages are scoped again to the current workspace and each linked customer location; use cursor to continue.

Параметры запроса
query
Поисковое выражение для этой операции. необязательно · string · до символов 120
limit
Максимальное число элементов на этой странице. обязательно по схеме · integer · по умолчанию 20 · минимум 1 · максимум 50
cursor
Продолжение из предыдущего ответа при тех же фильтрах. необязательно · string · до символов 236
conversationId
Exact conversation_key returned by messages_search in this workspace. обязательно по схеме · string · до символов 160
Что вернёт команда
items
Записи, которые вернул этот запрос. обязательно по схеме · array
nextCursor
Курсор для получения следующей страницы. обязательно по схеме · string / null
Поля и технические схемы
Входные поля и поля ответа conversation_messages
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "Case-insensitive name or text filter within the paginated result. Continue using nextCursor to search later records.",
      "type": "string",
      "maxLength": 120
    },
    "limit": {
      "default": 20,
      "description": "Maximum matching records returned, from 1 to 50. Large records may produce a shorter page; continue with nextCursor.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "cursor": {
      "description": "Opaque continuation cursor returned by this same action and workspace. Do not construct one.",
      "type": "string",
      "maxLength": 236
    },
    "conversationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Exact conversation_key returned by messages_search in this workspace."
    }
  },
  "required": [
    "limit",
    "conversationId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "recipient": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "channel": {
                    "type": "string",
                    "enum": [
                      "whatsapp",
                      "messenger",
                      "instagram",
                      "telegram",
                      "sms",
                      "email",
                      "imessage",
                      "channex",
                      "hospitable"
                    ],
                    "description": "Explicit intended messaging channel. Messenger uses the Facebook messaging integration; an advertising or social publishing integration cannot send a DM."
                  },
                  "address": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 320,
                    "description": "Recipient explicitly supplied by the user or read from an accessible conversation. Phone numbers must include + and country code; Messenger/Instagram use scoped numeric recipient IDs, Telegram uses its numeric chat ID. Never invent an ID from a name or handle."
                  }
                },
                "required": [
                  "channel",
                  "address"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact reusable channel/address from the stored contact method. Allows an authorized reply when a legacy conversation has no customer profile; null means no safe direct recipient could be determined."
          },
          "messageId": {
            "type": "string",
            "description": "Canonical root message document identifier."
          },
          "conversationId": {
            "type": "string",
            "description": "Existing conversation_key used by the messaging projection."
          },
          "customerId": {
            "description": "Canonical message contact_id, when present.",
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "type": "string",
            "description": "Stored normalized inbound or outbound direction."
          },
          "channel": {
            "type": "string",
            "description": "communication channel."
          },
          "provider": {
            "type": "string",
            "description": "Transport provider name; no provider credentials are returned."
          },
          "text": {
            "type": "string",
            "description": "Current stored message body as untrusted text, limited to 4000 characters. It may differ from the original AI suggestion after a human edit. Markup is never executed; provider payloads are omitted."
          },
          "aiSuggestedReply": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "flowId": {
                    "description": "Stored source Flow ID, not inferred from timing.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "flowNodeId": {
                    "description": "Stored source node ID when recorded.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "promptVersion": {
                    "description": "SHA-256 of the effective versioned rules and reviewed examples when recorded.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "promptSource": {
                    "description": "flow_node or company_legacy when recorded.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "model": {
                    "description": "Stored model name.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "replyMessageId": {
                    "description": "Exact generated reply document ID when recorded; does not prove delivery.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "text": {
                    "type": "string",
                    "description": "Original stored ai_suggested_reply.text, before message edits; untrusted text limited to 8192 characters."
                  },
                  "truncated": {
                    "type": "boolean",
                    "description": "True when the stored AI suggestion exceeds the 8192-character MCP limit."
                  }
                },
                "required": [
                  "flowId",
                  "flowNodeId",
                  "promptVersion",
                  "promptSource",
                  "model",
                  "replyMessageId",
                  "text",
                  "truncated"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Original AI suggestion for comparison with the current message text, or null when the source field is absent or invalid. This is not evidence that a message was sent."
          },
          "subject": {
            "type": "string",
            "description": "Stored email subject, limited to 200 characters; empty for messages without a subject."
          },
          "status": {
            "type": "string",
            "description": "Stored delivery status; queued or accepted does not mean delivered."
          },
          "sentAt": {
            "$ref": "#/$defs/_mcp1"
          },
          "lastStatusAt": {
            "$ref": "#/$defs/_mcp1"
          },
          "deliveryConfirmed": {
            "type": "boolean",
            "description": "True only for stored delivered or read status. False alone does not establish a failure."
          },
          "deliveryIssue": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "MESSAGE_WINDOW_CLOSED",
                      "MESSAGE_WINDOW_UNKNOWN",
                      "CHANNEL_RECONNECT_REQUIRED",
                      "CHANNEL_PERMISSION_REQUIRED",
                      "MESSAGE_RATE_LIMITED",
                      "MESSAGE_REJECTED",
                      "MESSAGE_DELIVERY_UNKNOWN"
                    ],
                    "description": "Stable delivery diagnostic code; an unknown failure does not establish a closed window."
                  },
                  "channel": {
                    "type": "string",
                    "enum": [
                      "whatsapp",
                      "instagram"
                    ],
                    "description": "Stored communication channel for this diagnosis."
                  },
                  "message": {
                    "type": "string",
                    "description": "Actionable Russian explanation with no raw provider error text."
                  },
                  "messages": {
                    "type": "object",
                    "properties": {
                      "ru": {
                        "type": "string",
                        "description": "Russian explanation."
                      },
                      "en": {
                        "type": "string",
                        "description": "English explanation."
                      }
                    },
                    "required": [
                      "ru",
                      "en"
                    ],
                    "additionalProperties": false,
                    "description": "Equivalent localized explanations."
                  },
                  "retryable": {
                    "type": "boolean",
                    "description": "Whether a confirmed rejected attempt allows a later retry; never initiates a send."
                  },
                  "humanActionRequired": {
                    "type": "boolean",
                    "description": "Whether a staff member must review the problem or choose a next action."
                  },
                  "nextActions": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "SELECT_APPROVED_TEMPLATE",
                        "WAIT_FOR_NEW_INBOUND",
                        "HAND_OFF_TO_HUMAN_AGENT",
                        "REVIEW_CONVERSATION_IN_NATIVE_INBOX",
                        "RECONNECT_CHANNEL",
                        "REVIEW_CHANNEL_PERMISSIONS",
                        "RETRY_AFTER_BACKOFF",
                        "REVIEW_MESSAGE",
                        "CHECK_DELIVERY_STATUS",
                        "CONTACT_SUPPORT"
                      ],
                      "description": "Advisory next step, not a command or permission to send."
                    },
                    "description": "Possible recovery steps. These are never executed automatically."
                  }
                },
                "required": [
                  "code",
                  "channel",
                  "message",
                  "messages",
                  "retryable",
                  "humanActionRequired",
                  "nextActions"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ],
            "description": "Safe diagnosis for a failed WhatsApp or Instagram message. Null does not establish successful delivery. Legacy records without structured error codes can only receive an unknown-failure diagnosis."
          }
        },
        "required": [
          "recipient",
          "messageId",
          "conversationId",
          "customerId",
          "direction",
          "channel",
          "provider",
          "text",
          "aiSuggestedReply",
          "subject",
          "status",
          "sentAt",
          "lastStatusAt",
          "deliveryConfirmed",
          "deliveryIssue"
        ],
        "additionalProperties": false
      },
      "description": "Accessible matching records in this page; tenant and location restrictions have already been applied."
    },
    "nextCursor": {
      "description": "Continuation cursor, or null when no later records remain. An empty page can still have a cursor because inaccessible records are omitted.",
      "type": [
        "string",
        "null"
      ]
    }
  },
  "required": [
    "items",
    "nextCursor"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp1": {
      "anyOf": [
        {
          "$ref": "#/$defs/_mcp0"
        },
        {
          "type": "null"
        }
      ],
      "description": "Stored event time represented in UTC, or null when absent."
    },
    "_mcp0": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
    }
  }
}