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

Медиа · Просмотр · Загрузка · Статусы

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

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

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

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

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

Recover the lifecycle and binary handoff of one managed image upload prepared by this account. Use after a lost upload response or before sending original JPEG, PNG or WebP bytes outside the model context. Requires media.upload and current entity update access; never uploads, polls, mutates native photo fields or returns image bytes. Completed describes the managed media record only.

Параметры запроса
mediaId
The exact server-issued mediaId from this account upload preparation. обязательно по схеме · string
Что вернёт команда
mediaId
Server-issued managed media reference; this is not a native photo field or Storage path. обязательно по схеме · string
entityType
Existing entity type. For a Team avatar use employee and the exact employeeId from employees_search/services_team, then attach the completed image with staff_employee_avatar_set. The server verifies tenant ownership, location access and entity permissions. обязательно по схеме · string · варианты customer, lead, task, order, product, company, employee
entityId
The exact existing entity for which the account prepared this upload. обязательно по схеме · string · до символов 128
status
Current managed upload state. Uploading remains in progress after its submission deadline because the accepted payload may still complete. Completed confirms its media record and sanitized storage upload; it does not confirm a native entity photo-field attachment. обязательно по схеме · string · варианты prepared, uploading, completed, expired, revoked
expiresAt
Original deadline for submitting image bytes, not a completion deadline for an accepted upload. Completed images remain available afterwards. обязательно по схеме · string
nextAction
Client handoff: submit original bytes, retry the same original payload before its deadline, check this same mediaId later for an accepted upload past its deadline, use the completed media reference, or prepare a new upload only after an unused preparation expires or is revoked. check_status_later must not create a replacement upload. обязательно по схеме · string · варианты upload_bytes, retry_same_upload, check_status_later, use_media, prepare_new_upload
upload
Binary handoff only while the original preparation can accept bytes; null for an uploading record past its submission deadline and for completed, expired or revoked uploads. обязательно по схеме · object / null
media
Completed managed image metadata, otherwise null. Download still requires media.read and current entity read access. обязательно по схеме · object / null
Поля и технические схемы
Входные поля и поля ответа media_get_upload_status
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mediaId": {
      "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": "The exact server-issued mediaId from this account upload preparation."
    }
  },
  "required": [
    "mediaId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mediaId": {
      "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 managed media reference; this is not a native photo field or Storage path."
    },
    "entityType": {
      "$ref": "#/$defs/_mcp0"
    },
    "entityId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "The exact existing entity for which the account prepared this upload."
    },
    "status": {
      "type": "string",
      "enum": [
        "prepared",
        "uploading",
        "completed",
        "expired",
        "revoked"
      ],
      "description": "Current managed upload state. Uploading remains in progress after its submission deadline because the accepted payload may still complete. Completed confirms its media record and sanitized storage upload; it does not confirm a native entity photo-field attachment."
    },
    "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": "Original deadline for submitting image bytes, not a completion deadline for an accepted upload. Completed images remain available afterwards."
    },
    "nextAction": {
      "type": "string",
      "enum": [
        "upload_bytes",
        "retry_same_upload",
        "check_status_later",
        "use_media",
        "prepare_new_upload"
      ],
      "description": "Client handoff: submit original bytes, retry the same original payload before its deadline, check this same mediaId later for an accepted upload past its deadline, use the completed media reference, or prepare a new upload only after an unused preparation expires or is revoked. check_status_later must not create a replacement upload."
    },
    "upload": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Short-lived upload-only URL for the exact prepared image. Submit raw bytes outside the model context; treat the URL as a secret until it expires."
            },
            "method": {
              "type": "string",
              "const": "PUT",
              "description": "Submit the exact original image bytes using HTTP PUT."
            },
            "mimeType": {
              "$ref": "#/$defs/_mcp1"
            },
            "byteLength": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 8388608,
              "description": "Required byte length of the original prepared source image, not the sanitized stored image."
            }
          },
          "required": [
            "url",
            "method",
            "mimeType",
            "byteLength"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Binary handoff only while the original preparation can accept bytes; null for an uploading record past its submission deadline and for completed, expired or revoked uploads."
    },
    "media": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "mediaId": {
              "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-generated image identifier. Use this identifier for retrieval; never construct a Storage path."
            },
            "entityType": {
              "$ref": "#/$defs/_mcp0"
            },
            "entityId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9_~:@+.-]+$",
              "description": "Verified entity identifier linked to this media record."
            },
            "mimeType": {
              "$ref": "#/$defs/_mcp1"
            },
            "byteLength": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 8388608,
              "description": "Byte count of the sanitized stored image; it may differ from the uploaded source."
            },
            "width": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 8192,
              "description": "Decoded and orientation-corrected image width in pixels."
            },
            "height": {
              "type": "integer",
              "exclusiveMinimum": 0,
              "maximum": 8192,
              "description": "Decoded and orientation-corrected image height in pixels."
            },
            "url": {
              "type": "string",
              "format": "uri",
              "description": "Authenticated download endpoint. Access requires the same workspace and current entity permissions; this is not a public bearer URL."
            }
          },
          "required": [
            "mediaId",
            "entityType",
            "entityId",
            "mimeType",
            "byteLength",
            "width",
            "height",
            "url"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ],
      "description": "Completed managed image metadata, otherwise null. Download still requires media.read and current entity read access."
    }
  },
  "required": [
    "mediaId",
    "entityType",
    "entityId",
    "status",
    "expiresAt",
    "nextAction",
    "upload",
    "media"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "type": "string",
      "enum": [
        "customer",
        "lead",
        "task",
        "order",
        "product",
        "company",
        "employee"
      ],
      "description": "Existing entity type. For a Team avatar use employee and the exact employeeId from employees_search/services_team, then attach the completed image with staff_employee_avatar_set. The server verifies tenant ownership, location access and entity permissions."
    },
    "_mcp1": {
      "type": "string",
      "enum": [
        "image/jpeg",
        "image/png",
        "image/webp"
      ],
      "description": "Actual image MIME type, checked against file signature and decoder; SVG and arbitrary files are not accepted."
    }
  }
}