MCP Control
Документы · Чтение

Документы · Просмотр · Заказы · Документы · Фрагмент

documents_read_order_document_chunk
Папки документов

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

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

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

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

Read the complete native layout accepted by documents_get_order_document as revision-bound plain JSON text fragments. Each fragment is at most 8192 UTF-8 bytes and ends on a whole character. Concatenate content in offset order, verify totalBytes/contentSha256, then parse once. Every call rechecks current company, parent and location access. The complete parsed layout and revision can be supplied to the existing update action within its unchanged request-size limit.

Параметры запроса
documentId
Canonical Documents ID in the connected company, obtained from document discovery. обязательно по схеме · string · до символов 128
offset
Смещение из предыдущей страницы или начальное значение из схемы. обязательно по схеме · integer · по умолчанию 0 · минимум 0 · максимум 9007199254740991
expectedRevision
Версия, прочитанная перед изменением. необязательно · string
Что вернёт команда
documentId
Canonical document ID whose native layout is being read. обязательно по схеме · string
parentId
Verified order or task ID, or null for a reusable template. обязательно по схеме · string / null
revision
Native content revision, also usable with the existing document update action. обязательно по схеме · string
serialization
Canonical JSON of the validated native layout, without the server-owned document ID or wrapper fields. обязательно по схеме · string
contentSha256
SHA-256 of the complete canonical layout JSON encoded as UTF-8; verify after concatenating all content fragments. обязательно по схеме · string
totalBytes
UTF-8 byte length of the complete canonical layout JSON. обязательно по схеме · integer · минимум 1 · максимум 9007199254740991
offset
UTF-8 byte offset of this fragment in the complete layout JSON. обязательно по схеме · integer · минимум 0 · максимум 9007199254740991
chunkBytes
UTF-8 byte length of this content fragment, at most 8192. обязательно по схеме · integer · минимум 0 · максимум 8192
content
Plain JSON text fragment, not base64 and not necessarily a complete JSON value. Concatenate content in offset order without parsing or unescaping each fragment. обязательно по схеме · string · до символов 8192
nextOffset
Смещение для получения следующей страницы. обязательно по схеме · integer / null
Поля и технические схемы
Входные поля и поля ответа documents_read_order_document_chunk
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Canonical Documents ID in the connected company, obtained from document discovery."
    },
    "offset": {
      "default": 0,
      "description": "UTF-8 byte offset returned as nextOffset by this same document read; use 0 for the first fragment. Offsets inside a UTF-8 character are rejected.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "expectedRevision": {
      "description": "Exact native revision from the first fragment. Required for every nonzero offset; a changed document causes CONFLICT.",
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    }
  },
  "required": [
    "documentId",
    "offset"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "description": "Canonical document ID whose native layout is being read."
    },
    "parentId": {
      "description": "Verified order or task ID, or null for a reusable template.",
      "type": [
        "string",
        "null"
      ]
    },
    "revision": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "Native content revision, also usable with the existing document update action."
    },
    "serialization": {
      "type": "string",
      "const": "native-layout-json-v1",
      "description": "Canonical JSON of the validated native layout, without the server-owned document ID or wrapper fields."
    },
    "contentSha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$",
      "description": "SHA-256 of the complete canonical layout JSON encoded as UTF-8; verify after concatenating all content fragments."
    },
    "totalBytes": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991,
      "description": "UTF-8 byte length of the complete canonical layout JSON."
    },
    "offset": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "UTF-8 byte offset of this fragment in the complete layout JSON."
    },
    "chunkBytes": {
      "type": "integer",
      "minimum": 0,
      "maximum": 8192,
      "description": "UTF-8 byte length of this content fragment, at most 8192."
    },
    "content": {
      "type": "string",
      "maxLength": 8192,
      "description": "Plain JSON text fragment, not base64 and not necessarily a complete JSON value. Concatenate content in offset order without parsing or unescaping each fragment."
    },
    "nextOffset": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ],
      "description": "UTF-8 byte offset for the next fragment using this same revision, or null when the complete layout has been read."
    }
  },
  "required": [
    "documentId",
    "parentId",
    "revision",
    "serialization",
    "contentSha256",
    "totalBytes",
    "offset",
    "chunkBytes",
    "content",
    "nextOffset"
  ],
  "additionalProperties": false
}