MCP Control
Файлы и медиа · Чтение

Файлы · Просмотр · Загрузка · Статусы

files_get_upload_status
Фотокамера и образцы цвета

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

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

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

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

Recover the current private file handoff or completed metadata. Only the preparing account can recover it. For uploading, retry the exact original bytes, including after the initial submission deadline; a changed payload conflicts. This status read never starts a file upload.

Параметры запроса
fileId
Server-issued file UUID from files_prepare_upload/list/get, never an image UUID or storage path. обязательно по схеме · string
Что вернёт команда
fileId
Server-issued private file UUID, separate from managed image IDs. обязательно по схеме · string
referenceId
Internal attachment reference file:<fileId>; never proof of access. обязательно по схеме · string
entityType
Existing entity type. Current company, location and entity permissions are checked before accepting or reading a private file. обязательно по схеме · string · варианты customer, lead, task, order, product, company, employee
entityId
Canonical existing entity identifier, resolved through current company and location permissions. обязательно по схеме · string · до символов 128
status
Current managed file upload state, independent of native entity attachment state. обязательно по схеме · string · варианты prepared, uploading, completed, expired, revoked
expiresAt
Deadline for first submission. An already accepted exact payload can be retried until its upload is revoked. обязательно по схеме · string
nextAction
Continue this upload with original bytes, use its completed reference, or prepare a replacement after expiry/revocation. обязательно по схеме · string · варианты upload_bytes, retry_same_upload, use_file, prepare_new_upload
upload
Authenticated handoff while prepared or uploading; otherwise null. обязательно по схеме · object / null
file
Completed file metadata, otherwise null; downloads still require current permissions. обязательно по схеме · object / null
Поля и технические схемы
Входные поля и поля ответа files_get_upload_status
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fileId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "Server-issued file UUID from files_prepare_upload/list/get, never an image UUID or storage path."
    }
  },
  "required": [
    "fileId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "fileId": {
      "$ref": "#/$defs/_mcp0"
    },
    "referenceId": {
      "$ref": "#/$defs/_mcp1"
    },
    "entityType": {
      "$ref": "#/$defs/_mcp2"
    },
    "entityId": {
      "$ref": "#/$defs/_mcp3"
    },
    "status": {
      "type": "string",
      "enum": [
        "prepared",
        "uploading",
        "completed",
        "expired",
        "revoked"
      ],
      "description": "Current managed file upload state, independent of native entity attachment state."
    },
    "expiresAt": {
      "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))$",
      "description": "Deadline for first submission. An already accepted exact payload can be retried until its upload is revoked."
    },
    "nextAction": {
      "type": "string",
      "enum": [
        "upload_bytes",
        "retry_same_upload",
        "use_file",
        "prepare_new_upload"
      ],
      "description": "Continue this upload with original bytes, use its completed reference, or prepare a replacement after expiry/revocation."
    },
    "upload": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Authenticated binary upload endpoint; send bytes outside the model context."
            },
            "method": {
              "type": "string",
              "const": "PUT",
              "description": "Send original file bytes with HTTP PUT to the authenticated handoff URL."
            },
            "mimeType": {
              "$ref": "#/$defs/_mcp4"
            },
            "byteLength": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 20971520,
              "description": "Exact source/stored file byte length, at most20MiB."
            }
          },
          "required": [
            "url",
            "method",
            "mimeType",
            "byteLength"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Authenticated handoff while prepared or uploading; otherwise null."
    },
    "file": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "fileId": {
              "$ref": "#/$defs/_mcp0"
            },
            "referenceId": {
              "$ref": "#/$defs/_mcp1"
            },
            "entityType": {
              "$ref": "#/$defs/_mcp2"
            },
            "entityId": {
              "$ref": "#/$defs/_mcp3"
            },
            "fileName": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160,
              "description": "Safe download filename, without paths or control characters, with the matching extension."
            },
            "mimeType": {
              "$ref": "#/$defs/_mcp4"
            },
            "byteLength": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 20971520,
              "description": "Exact source/stored file byte length, at most20MiB."
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Current authenticated attachment download URL. No public, presigned or bearer URL is returned."
            }
          },
          "required": [
            "fileId",
            "referenceId",
            "entityType",
            "entityId",
            "fileName",
            "mimeType",
            "byteLength",
            "url"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Completed file metadata, otherwise null; downloads still require current permissions."
    }
  },
  "required": [
    "fileId",
    "referenceId",
    "entityType",
    "entityId",
    "status",
    "expiresAt",
    "nextAction",
    "upload",
    "file"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "Server-issued private file UUID, separate from managed image IDs."
    },
    "_mcp1": {
      "type": "string",
      "pattern": "^file:[0-9a-f-]{36}$",
      "description": "Internal attachment reference file:<fileId>; never proof of access."
    },
    "_mcp2": {
      "type": "string",
      "enum": [
        "customer",
        "lead",
        "task",
        "order",
        "product",
        "company",
        "employee"
      ],
      "description": "Existing entity type. Current company, location and entity permissions are checked before accepting or reading a private file."
    },
    "_mcp3": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Canonical existing entity identifier, resolved through current company and location permissions."
    },
    "_mcp4": {
      "type": "string",
      "enum": [
        "video/mp4",
        "video/webm",
        "application/pdf",
        "text/plain",
        "text/csv",
        "application/json",
        "application/zip",
        "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
        "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
        "application/vnd.openxmlformats-officedocument.presentationml.presentation"
      ],
      "description": "Actual supported document or MP4/WebM video format. Video playback depends on browser codec support. HTML, SVG, scripts, executables, encrypted archives and macro-enabled Office files are not accepted."
    }
  }
}