MCP Control
Оборудование · Изменение

Оборудование · Записи · Наблюдение

equipment_record_observation
Посылки на упаковочном столе

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

Подготовить
  1. Вы указываетеУстройство
  2. ПомощникПодготовка
  3. Вы получаетеПредпросмотр
Запрос в чат
Подготовь «Оборудование / Записи / Наблюдение». Для изменения нужны устройство, комментарий. Покажи объект и ожидаемый эффект до выполнения.
Что входит в подготовку
deviceId
Устройство
comment
Комментарий
measurement
Параметр
Применить
  1. Вы указываетеСогласованные значения
  2. ПомощникОдин вызов
  3. Вы получаетеОтвет операции
Запрос в чат
На учебной записи подготовь «Оборудование / Записи / Наблюдение» с параметром deviceId = DEMO-101. Покажи остальные обязательные значения и выполни действие, когда согласованы все поля.
Фрагмент учебных параметров
deviceId
DEMO-101
comment
Проверено на учебной записи
commitConfiguredConsumables
true
Проверить итог
  1. Вы указываетеИсходный ответ
  2. ПомощникСверка результата
  3. Вы получаетеПодтверждение
Запрос в чат
Проверь результат «Оборудование / Записи / Наблюдение» по исходному ответу. Покажи observationId, устройство. Объясни, чем подтвердить эффект для выбранного объекта.
Как проследить одну попытку
  1. ЗапросСохранить исходный ключ
  2. ОтветПроверить статус
  3. ПроверкаСверить эффект операции
Как работает действие

Этот вызов может изменить рабочие данные. Согласуйте точный объект, новые значения и ожидаемый результат. Присвойте операции стабильный requestId. При повторе той же операции используйте прежний ключ и те же значения.

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

Record a manual equipment comment, numeric reading or completed native checklist using the connected employee and device's existing equipment/location. Discover checklist IDs and configuration revision with equipment_get_observation_context; include only items the employee actually checked. Include measurement only for manual numeric entry, in the same units as configured limits. Out-of-range readings remain warnings. When manager approval is required, a valid assigned Equipment.manager is mandatory and the observation is stored as waite for equipment_review_observation. Recording it does not approve it. Supply required photos and signer-provided signature using evidence references to existing native public company uploads. Their storage metadata and ownership are checked atomically; this does not prove physical inspection or signer identity. For configured consumables pass commitConfiguredConsumables=true. For a configured native Flow pass commitConfiguredFlow with its exact Flow ID; SQL commits the intent and a deterministic outbox dispatches afterward. Read equipment_get_flow_dispatch for execution status. No sensor impersonation or incident resolution.

Параметры запроса
deviceId
Exact equipment_devices identifier in this workspace. Its existing equipment and establishment determine the target; the caller cannot substitute another location. обязательно по схеме · string · до символов 128
comment
Human observation about this device. Does not replace a required checklist, photo, signature or manager approval. обязательно по схеме · string · до символов 4000
measurement
Include only for a device configured for manual numeric entry. The server locks the device and records its current limits with this value. Omit to retain the existing comment-only operation. необязательно · object
checklist
Use only when a checklist is configured. Its configuration, company, target and all evidence requirements are locked and verified before one native EquipmentLog record is committed. необязательно · object
evidence
Native photo/signature references. Files stay in existing storage; the model never receives upload credentials. Required evidence cannot be replaced by a comment. необязательно · object
commitConfiguredConsumables
Required opt-in for a device with configured consumables. Atomically records the observation and its native write_offs stock movement; the device, storage, products and default quantities are resolved from current company configuration; consumableQuantities can supply actual quantities for this observation. Requires sufficient posted stock. Omit for devices without consumables and for historical requests. необязательно · boolean
consumableQuantities
Actual positive quantity for every configured consumable line, in configuration order and native product units. Requires commitConfiguredConsumables=true. Use the revision from equipment_get_observation_context. Only quantities can change; product and warehouse stay configured. Up to 8 decimal places; defaults remain unchanged. необязательно · object
commitConfiguredFlow
Explicitly run the current Device.flow through the native Flow dispatcher after this observation commits. Use the exact configured Flow ID; a deterministic outbox records dispatch separately from the SQL receipt. необязательно · object
requestId
Ключ этой операции. Для повтора с теми же аргументами сохраните исходное значение. обязательно по схеме · string
Что вернёт команда
observationId
Canonical native equipment_events identifier for the recorded observation. обязательно по схеме · string · до символов 128
deviceId
Device verified and locked when the observation was recorded. обязательно по схеме · string · до символов 128
equipmentId
Existing equipment asset resolved by the server from the device. обязательно по схеме · string · до символов 128
locationId
Existing establishment resolved by the server from the equipment asset. обязательно по схеме · string · до символов 128
recordedAt
Server timestamp when this observation was committed. обязательно по схеме · string
source
Native EquipmentLog source default, preserved without inventing a new provider or origin. обязательно по схеме · string / null
status
Native EquipmentLog status default. This does not claim approval, corrective action or incident resolution. обязательно по схеме · string / null
sideEffects
Stores the manual observation, optional checklist/measurement, native pending manager request when configured and transactional receipt. The with_stock variants atomically commit the configured native write-off through its existing stock trigger. No Flow, notification, sensor or manager approval is executed. обязательно по схеме · string · варианты manual_comment_only, manual_measurement_only, manual_checklist_only, manual_comment_with_stock, manual_measurement_with_stock, manual_checklist_with_stock
stock
Present only when commitConfiguredConsumables was supplied and the native stock movement committed. No financial valuation is inferred. необязательно · object
flowDispatch
Immutable SQL intent for the configured Flow. It does not claim that the native Flow ran; read equipment_get_flow_dispatch for current execution status. необязательно · object
evidence
Historical evidence acknowledgment; later file deletion never changes the operation receipt. необязательно · object
approval
Present only when the observation was committed in native waite state awaiting manager review. No approval is implied. необязательно · object
checklist
Present only when the operation explicitly supplied a complete native checklist. необязательно · object
measurement
Recorded manual value and locked device limits. An out-of-range reading remains recorded as a warning requiring follow-up, not as a completed corrective action. необязательно · object
Поля и технические схемы
Входные поля и поля ответа equipment_record_observation
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "deviceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Exact equipment_devices identifier in this workspace. Its existing equipment and establishment determine the target; the caller cannot substitute another location."
    },
    "comment": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000,
      "description": "Human observation about this device. Does not replace a required checklist, photo, signature or manager approval."
    },
    "measurement": {
      "description": "Include only for a device configured for manual numeric entry. The server locks the device and records its current limits with this value. Omit to retain the existing comment-only operation.",
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Actual manually observed numeric value. Do not estimate or substitute an expected value."
        },
        "unit": {
          "type": "string",
          "minLength": 1,
          "maxLength": 32,
          "pattern": "^[^\\x00-\\x1f\\x7f]+$",
          "description": "Caller-reported unit, for example °C. Supply the reading in the same units as the configured numeric limits. The native device has no authoritative unit field: the server cannot verify or convert this label."
        }
      },
      "required": [
        "value",
        "unit"
      ],
      "additionalProperties": false
    },
    "checklist": {
      "description": "Use only when a checklist is configured. Its configuration, company, target and all evidence requirements are locked and verified before one native EquipmentLog record is committed.",
      "type": "object",
      "properties": {
        "expectedRevision": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$",
          "description": "Exact configuration revision from equipment_get_observation_context. Refresh all pages after a conflict."
        },
        "completedItemIds": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_~:@+.-]+$",
            "description": "Canonical native identifier, never a document path."
          },
          "description": "IDs of every native checklist item actually checked by the employee. Never infer physical inspection or mark unchecked items complete. IDs must match the entire configured checklist; order is not significant for storage."
        }
      },
      "required": [
        "expectedRevision",
        "completedItemIds"
      ],
      "additionalProperties": false
    },
    "evidence": {
      "type": "object",
      "properties": {
        "photos": {
          "description": "Actual employee-supplied photos for this observation. The backend verifies existing company-owned image objects before recording their native URLs.",
          "minItems": 1,
          "maxItems": 5,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 4000,
            "format": "uri",
            "description": "Existing public company image URL from the native upload/file picker, in this deployment's Ingridients bucket. No base64, private download token, arbitrary host or generated substitute for physical evidence."
          }
        },
        "signature": {
          "description": "Existing signature image supplied by the signer through the native UI. Never generate, infer or reuse a signature without their instruction. Storage validation does not establish signer identity or legal consent.",
          "type": "string",
          "maxLength": 4000,
          "format": "uri"
        }
      },
      "additionalProperties": false,
      "description": "Native photo/signature references. Files stay in existing storage; the model never receives upload credentials. Required evidence cannot be replaced by a comment."
    },
    "commitConfiguredConsumables": {
      "description": "Required opt-in for a device with configured consumables. Atomically records the observation and its native write_offs stock movement; the device, storage, products and default quantities are resolved from current company configuration; consumableQuantities can supply actual quantities for this observation. Requires sufficient posted stock. Omit for devices without consumables and for historical requests.",
      "type": "boolean",
      "const": true
    },
    "consumableQuantities": {
      "description": "Actual positive quantity for every configured consumable line, in configuration order and native product units. Requires commitConfiguredConsumables=true. Use the revision from equipment_get_observation_context. Only quantities can change; product and warehouse stay configured. Up to 8 decimal places; defaults remain unchanged.",
      "type": "object",
      "properties": {
        "expectedRevision": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$",
          "description": "Exact full Device and Equipment revision from the observation context."
        },
        "items": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "index": {
                "type": "integer",
                "minimum": 0,
                "maximum": 99,
                "description": "Zero-based position of the configured consumable line."
              },
              "productId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128,
                "pattern": "^[A-Za-z0-9_~:@+.-]+$",
                "description": "Unchanged native Product ID at this configured line."
              },
              "quantity": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1000000000,
                "description": "Actual quantity used in this product unit, positive and at most 8 decimal places."
              }
            },
            "required": [
              "index",
              "productId",
              "quantity"
            ],
            "additionalProperties": false,
            "description": "One configured consumable with its actual reported usage."
          },
          "description": "Every configured line exactly once, in original order; products and storage cannot be substituted."
        }
      },
      "required": [
        "expectedRevision",
        "items"
      ],
      "additionalProperties": false
    },
    "commitConfiguredFlow": {
      "description": "Explicitly run the current Device.flow through the native Flow dispatcher after this observation commits. Use the exact configured Flow ID; a deterministic outbox records dispatch separately from the SQL receipt.",
      "type": "object",
      "properties": {
        "flowId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Exact current Device.flow identifier; use the configured native Flow, not a caller-selected alternative."
        }
      },
      "required": [
        "flowId"
      ],
      "additionalProperties": false
    },
    "requestId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Unique stable request identifier. Reuse the exact device and comment when checking or retrying this observation."
    }
  },
  "required": [
    "deviceId",
    "comment",
    "requestId"
  ],
  "additionalProperties": false
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "observationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Canonical native equipment_events identifier for the recorded observation."
    },
    "deviceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Device verified and locked when the observation was recorded."
    },
    "equipmentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Existing equipment asset resolved by the server from the device."
    },
    "locationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128,
      "pattern": "^[A-Za-z0-9_~:@+.-]+$",
      "description": "Existing establishment resolved by the server from the equipment asset."
    },
    "recordedAt": {
      "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "description": "Server timestamp when this observation was committed."
    },
    "source": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "description": "Native EquipmentLog source default, preserved without inventing a new provider or origin."
    },
    "status": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "description": "Native EquipmentLog status default. This does not claim approval, corrective action or incident resolution."
    },
    "sideEffects": {
      "type": "string",
      "enum": [
        "manual_comment_only",
        "manual_measurement_only",
        "manual_checklist_only",
        "manual_comment_with_stock",
        "manual_measurement_with_stock",
        "manual_checklist_with_stock"
      ],
      "description": "Stores the manual observation, optional checklist/measurement, native pending manager request when configured and transactional receipt. The with_stock variants atomically commit the configured native write-off through its existing stock trigger. No Flow, notification, sensor or manager approval is executed."
    },
    "stock": {
      "description": "Present only when commitConfiguredConsumables was supplied and the native stock movement committed. No financial valuation is inferred.",
      "type": "object",
      "properties": {
        "writeoffId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Native write_offs ID committed in the same SQL transaction as the observation."
        },
        "storageId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Current device-configured company storage."
        },
        "lineCount": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "description": "Number of configured consumable lines written to the native write-off."
        },
        "quantityTotal": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Sum of committed Gross quantities across lines, using actual quantities when supplied; product units may differ."
        },
        "stockEffect": {
          "type": "string",
          "const": "decremented_by_native_trigger",
          "description": "The installed write-off trigger posted the stock decrease in the same SQL transaction."
        }
      },
      "required": [
        "writeoffId",
        "storageId",
        "lineCount",
        "quantityTotal",
        "stockEffect"
      ],
      "additionalProperties": false
    },
    "flowDispatch": {
      "description": "Immutable SQL intent for the configured Flow. It does not claim that the native Flow ran; read equipment_get_flow_dispatch for current execution status.",
      "type": "object",
      "properties": {
        "flowId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Configured native Flow ID locked by the observation RPC."
        },
        "dispatchId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Deterministic outbox ID for this exact observation request."
        },
        "dispatchIntent": {
          "type": "string",
          "const": "committed",
          "description": "The SQL transaction committed the Flow intent; execution status is separate."
        }
      },
      "required": [
        "flowId",
        "dispatchId",
        "dispatchIntent"
      ],
      "additionalProperties": false
    },
    "evidence": {
      "description": "Historical evidence acknowledgment; later file deletion never changes the operation receipt.",
      "type": "object",
      "properties": {
        "photoCount": {
          "type": "integer",
          "minimum": 0,
          "maximum": 5,
          "description": "Number of verified native image references recorded at commit."
        },
        "signatureRecorded": {
          "type": "boolean",
          "description": "Whether a signer-supplied image reference was stored. This is not identity verification or a legal consent assertion."
        },
        "storage": {
          "type": "string",
          "const": "native_company_uploads",
          "description": "Existing company image bucket; no new media store or public exposure was created."
        }
      },
      "required": [
        "photoCount",
        "signatureRecorded",
        "storage"
      ],
      "additionalProperties": false
    },
    "approval": {
      "description": "Present only when the observation was committed in native waite state awaiting manager review. No approval is implied.",
      "type": "object",
      "properties": {
        "required": {
          "type": "boolean",
          "const": true,
          "description": "This observation requires the configured native manager to review it."
        },
        "managerId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9_~:@+.-]+$",
          "description": "Assigned manager locked from Equipment.manager at commit; never chosen by the caller."
        },
        "status": {
          "type": "string",
          "const": "pending",
          "description": "Historical state when recorded. Use equipment_events_get for the current record and equipment_review_observation for authorized approval."
        }
      },
      "required": [
        "required",
        "managerId",
        "status"
      ],
      "additionalProperties": false
    },
    "checklist": {
      "description": "Present only when the operation explicitly supplied a complete native checklist.",
      "type": "object",
      "properties": {
        "configurationRevision": {
          "type": "string",
          "pattern": "^[a-f0-9]{32}$",
          "description": "Configuration checked atomically at commit."
        },
        "completedItemIds": {
          "minItems": 1,
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 128,
            "pattern": "^[A-Za-z0-9_~:@+.-]+$",
            "description": "Canonical native identifier, never a document path."
          },
          "description": "Recorded checklist IDs in native configuration order."
        }
      },
      "required": [
        "configurationRevision",
        "completedItemIds"
      ],
      "additionalProperties": false
    },
    "measurement": {
      "description": "Recorded manual value and locked device limits. An out-of-range reading remains recorded as a warning requiring follow-up, not as a completed corrective action.",
      "type": "object",
      "properties": {
        "value": {
          "type": "number",
          "description": "Actual reported numeric reading."
        },
        "unit": {
          "type": "string",
          "minLength": 1,
          "maxLength": 32,
          "description": "Caller-reported unit, preserved without conversion or independent unit verification."
        },
        "minimum": {
          "description": "Minimum locked from the device at commit, or null when absent.",
          "type": [
            "number",
            "null"
          ]
        },
        "maximum": {
          "description": "Maximum locked from the device at commit, or null when absent.",
          "type": [
            "number",
            "null"
          ]
        },
        "thresholdState": {
          "type": "string",
          "enum": [
            "below_minimum",
            "above_maximum",
            "within_configured_limits",
            "not_configured"
          ],
          "description": "Comparison of raw numeric reading against the locked limits; inclusive endpoints. Does not establish correct units or calibration."
        },
        "requiresAction": {
          "type": "boolean",
          "description": "True for a recorded out-of-range warning; corrective action and approval have not been performed."
        }
      },
      "required": [
        "value",
        "unit",
        "minimum",
        "maximum",
        "thresholdState",
        "requiresAction"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "observationId",
    "deviceId",
    "equipmentId",
    "locationId",
    "recordedAt",
    "source",
    "status",
    "sideEffects"
  ],
  "additionalProperties": false
}