MCP Control
Обзор  ›  CRM
CRM · Чтение

Лиды · Просмотр · Операция

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

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

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

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

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

Recover an exact lead write using its original Action and arguments. Checks original permission and current lead access. Never starts or repeats a write; use lead_resume_operation only after not_committed.

Параметры запроса
operation
Выберите вариант операции из контракта. обязательно по схеме
Что вернёт команда
state
Whether the exact business mutation committed. not_committed does not automatically retry. обязательно по схеме · string · варианты completed, not_committed
result
Original immutable write result, or null. Read edit context for current state. обязательно по схеме · null
Поля и технические схемы
Входные поля и поля ответа lead_get_operation
Вход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "operation": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "crm_lead_create",
              "description": "Original lead write Action."
            },
            "input": {
              "type": "object",
              "properties": {
                "requestId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "name_lid": {
                      "description": "Native Leads.name_lid.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "customerId": {
                      "description": "Native Leads.customerId. Verified workspace ID.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "name": {
                      "description": "Native Leads.name.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "lastName": {
                      "description": "Native Leads.lastName.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "posicion": {
                      "description": "Native Leads.posicion.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "contacts": {
                      "$ref": "#/$defs/_mcp3"
                    },
                    "address": {
                      "$ref": "#/$defs/_mcp5"
                    },
                    "company": {
                      "description": "Native Leads.company.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "source": {
                      "description": "Native Leads.source.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "sourceDetail": {
                      "description": "Native Leads.sourceDetail.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "manager": {
                      "description": "Native Leads.manager. Verified workspace ID.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "priority": {
                      "description": "Native Leads.priority.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "segment": {
                      "description": "Native Leads.segment.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "industry": {
                      "description": "Native Leads.industry.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "timezone": {
                      "description": "Native Leads.timezone.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "budget": {
                      "description": "Native Leads.budget.",
                      "type": "number"
                    },
                    "currency": {
                      "description": "Native Leads.currency.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "consentGivenAt": {
                      "$ref": "#/$defs/_mcp6"
                    },
                    "tags": {
                      "$ref": "#/$defs/_mcp7"
                    },
                    "comment": {
                      "description": "Native Leads.comment.",
                      "type": "string",
                      "maxLength": 12000
                    },
                    "fields": {
                      "$ref": "#/$defs/_mcp9"
                    },
                    "language": {
                      "description": "Native Leads.language.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "hearus": {
                      "description": "Native Leads.hearus.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "companyLabel": {
                      "description": "Editable client business name, separate from the tenant company binding.",
                      "type": "string",
                      "maxLength": 500
                    },
                    "pipelineId": {
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                      "description": "Existing pipeline ID in the connected company."
                    },
                    "stageId": {
                      "description": "New leads enter pipeline defolt. If supplied, this must equal defolt; change stage after creation.",
                      "type": "string",
                      "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
                    }
                  },
                  "required": [
                    "pipelineId"
                  ],
                  "additionalProperties": false,
                  "description": "Initial native lead fields, with required name_lid and pipelineId. Server sets identity, date and history."
                }
              },
              "required": [
                "requestId",
                "values"
              ],
              "additionalProperties": false,
              "description": "Exact original arguments, including the original requestId."
            }
          },
          "required": [
            "action",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "crm_lead_update",
              "description": "Original lead write Action."
            },
            "input": {
              "type": "object",
              "properties": {
                "resourceId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "expectedRevision": {
                  "$ref": "#/$defs/_mcp10"
                },
                "requestId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "name_lid": {
                      "description": "Native Leads.name_lid.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "customerId": {
                      "description": "Native Leads.customerId. Verified workspace ID.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "name": {
                      "description": "Native Leads.name.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "lastName": {
                      "description": "Native Leads.lastName.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "posicion": {
                      "description": "Native Leads.posicion.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "contacts": {
                      "$ref": "#/$defs/_mcp3"
                    },
                    "address": {
                      "$ref": "#/$defs/_mcp5"
                    },
                    "company": {
                      "description": "Native Leads.company.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "source": {
                      "description": "Native Leads.source.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "sourceDetail": {
                      "description": "Native Leads.sourceDetail.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "manager": {
                      "description": "Native Leads.manager. Verified workspace ID.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "priority": {
                      "description": "Native Leads.priority.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "segment": {
                      "description": "Native Leads.segment.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "industry": {
                      "description": "Native Leads.industry.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "timezone": {
                      "description": "Native Leads.timezone.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "budget": {
                      "description": "Native Leads.budget.",
                      "type": "number"
                    },
                    "currency": {
                      "description": "Native Leads.currency.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "consentGivenAt": {
                      "$ref": "#/$defs/_mcp6"
                    },
                    "tags": {
                      "$ref": "#/$defs/_mcp7"
                    },
                    "comment": {
                      "description": "Native Leads.comment.",
                      "type": "string",
                      "maxLength": 12000
                    },
                    "fields": {
                      "$ref": "#/$defs/_mcp9"
                    },
                    "language": {
                      "description": "Native Leads.language.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "hearus": {
                      "description": "Native Leads.hearus.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "companyLabel": {
                      "description": "Editable client business name, separate from the tenant company binding.",
                      "type": "string",
                      "maxLength": 500
                    }
                  },
                  "additionalProperties": false,
                  "description": "Native lead fields. Omitted fields are preserved; nested objects merge and supplied arrays replace. Status, history and automation fields are server-managed."
                }
              },
              "required": [
                "resourceId",
                "expectedRevision",
                "requestId",
                "values"
              ],
              "additionalProperties": false,
              "description": "Exact original arguments, including the original requestId."
            }
          },
          "required": [
            "action",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "lead_set_stage",
              "description": "Original lead write Action."
            },
            "input": {
              "type": "object",
              "properties": {
                "resourceId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "expectedRevision": {
                  "$ref": "#/$defs/_mcp10"
                },
                "requestId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "pipelineId": {
                  "description": "Omit to keep the existing pipeline; supply to move to another company pipeline.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
                },
                "stageId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Exact stage ID from the selected native pipeline, not its display label."
                },
                "reason": {
                  "description": "Optional reason appended to the native status/history entry.",
                  "type": "string",
                  "maxLength": 1000
                }
              },
              "required": [
                "resourceId",
                "expectedRevision",
                "requestId",
                "stageId"
              ],
              "additionalProperties": false,
              "description": "Exact original arguments, including the original requestId."
            }
          },
          "required": [
            "action",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "lead_archive",
              "description": "Original lead write Action."
            },
            "input": {
              "type": "object",
              "properties": {
                "resourceId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "expectedRevision": {
                  "$ref": "#/$defs/_mcp10"
                },
                "requestId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "reason": {
                  "description": "Optional reason appended to the native status/history entry.",
                  "type": "string",
                  "maxLength": 1000
                }
              },
              "required": [
                "resourceId",
                "expectedRevision",
                "requestId"
              ],
              "additionalProperties": false,
              "description": "Exact original arguments, including the original requestId."
            }
          },
          "required": [
            "action",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "lead_restore",
              "description": "Original lead write Action."
            },
            "input": {
              "type": "object",
              "properties": {
                "resourceId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "expectedRevision": {
                  "$ref": "#/$defs/_mcp10"
                },
                "requestId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "stageId": {
                  "description": "Optional current pipeline stage. Otherwise restore the last non-cancel stage, or the validated pipeline default.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$"
                },
                "reason": {
                  "description": "Optional reason appended to the native status/history entry.",
                  "type": "string",
                  "maxLength": 1000
                }
              },
              "required": [
                "resourceId",
                "expectedRevision",
                "requestId"
              ],
              "additionalProperties": false,
              "description": "Exact original arguments, including the original requestId."
            }
          },
          "required": [
            "action",
            "input"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "action": {
              "type": "string",
              "const": "lead_add_note",
              "description": "Original lead write Action."
            },
            "input": {
              "type": "object",
              "properties": {
                "leadId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120,
                  "description": "Native note name."
                },
                "text": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 4000,
                  "description": "Native note value."
                },
                "requestId": {
                  "$ref": "#/$defs/_mcp0"
                },
                "expectedRevision": {
                  "description": "Optional lead revision; notes append atomically even when omitted.",
                  "type": "string",
                  "pattern": "^\\d{1,12}:\\d{1,9}$"
                }
              },
              "required": [
                "leadId",
                "title",
                "text",
                "requestId"
              ],
              "additionalProperties": false,
              "description": "Exact original arguments, including the original requestId."
            }
          },
          "required": [
            "action",
            "input"
          ],
          "additionalProperties": false
        }
      ],
      "description": "Original write Action and exact arguments."
    }
  },
  "required": [
    "operation"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{8,128}$",
      "description": "Stable ID for these exact arguments. Reuse unchanged after an uncertain response."
    },
    "_mcp3": {
      "description": "Native Leads.contacts. Supplied array replaces the whole array.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "$ref": "#/$defs/_mcp2"
      }
    },
    "_mcp5": {
      "description": "Native Leads.address.",
      "type": "object",
      "properties": {
        "Number": {
          "description": "Native Address_json.Number.",
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "Available": {
          "description": "Native Address_json.Available.",
          "type": "boolean"
        },
        "name": {
          "description": "Native Address_json.name.",
          "type": "string",
          "maxLength": 2000
        },
        "latLng": {
          "$ref": "#/$defs/_mcp4"
        },
        "address": {
          "description": "Native Address_json.address.",
          "type": "string",
          "maxLength": 2000
        },
        "city": {
          "description": "Native Address_json.city.",
          "type": "string",
          "maxLength": 2000
        },
        "state": {
          "description": "Native Address_json.state.",
          "type": "string",
          "maxLength": 2000
        },
        "country": {
          "description": "Native Address_json.country.",
          "type": "string",
          "maxLength": 2000
        },
        "zipCode": {
          "description": "Native Address_json.zipCode.",
          "type": "string",
          "maxLength": 2000
        },
        "Apartment": {
          "description": "Native Address_json.Apartment.",
          "type": "string",
          "maxLength": 2000
        },
        "Code-door": {
          "description": "Native Address_json.Code-door.",
          "type": "string",
          "maxLength": 2000
        },
        "Comment": {
          "description": "Native Address_json.Comment.",
          "type": "string",
          "maxLength": 12000
        },
        "Zone": {
          "description": "Native Address_json.Zone.",
          "type": "string",
          "maxLength": 2000
        },
        "tax": {
          "description": "Native Address_json.tax.",
          "type": "number"
        },
        "view": {
          "description": "Native Address_json.view.",
          "type": "string",
          "maxLength": 2000
        }
      },
      "additionalProperties": false
    },
    "_mcp6": {
      "description": "Native Leads.consentGivenAt. ISO 8601 with timezone; stored as a timestamp.",
      "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)))$"
    },
    "_mcp7": {
      "description": "Native Leads.tags. Supplied array replaces the whole array.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 2000,
        "description": "Native Leads.tags."
      }
    },
    "_mcp9": {
      "description": "Native Leads.fields. Supplied array replaces the whole array.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "$ref": "#/$defs/_mcp8"
      }
    },
    "_mcp10": {
      "type": "string",
      "pattern": "^\\d{1,12}:\\d{1,9}$",
      "description": "Exact Firestore update revision from crm_lead_edit_context. Refresh after any change."
    },
    "_mcp2": {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/_mcp1"
        },
        "name": {
          "description": "Native contact.name.",
          "type": "string",
          "maxLength": 2000
        },
        "value": {
          "description": "Native contact.value.",
          "type": "string",
          "maxLength": 2000
        }
      },
      "additionalProperties": false,
      "description": "Native Leads.contacts."
    },
    "_mcp4": {
      "description": "Native Address_json.latLng. Supplied array replaces the whole array.",
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "number",
        "description": "Native Address_json.latLng."
      }
    },
    "_mcp8": {
      "type": "object",
      "properties": {
        "date": {
          "$ref": "#/$defs/_mcp1"
        },
        "name": {
          "description": "Native contact.name.",
          "type": "string",
          "maxLength": 2000
        },
        "value": {
          "description": "Native contact.value.",
          "type": "string",
          "maxLength": 2000
        }
      },
      "additionalProperties": false,
      "description": "Native Leads.fields."
    },
    "_mcp1": {
      "description": "Native contact.date. ISO 8601 with timezone; stored as a timestamp.",
      "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)))$"
    }
  }
}
Выход · JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "state": {
      "type": "string",
      "enum": [
        "completed",
        "not_committed"
      ],
      "description": "Whether the exact business mutation committed. not_committed does not automatically retry."
    },
    "result": {
      "anyOf": [
        {
          "anyOf": [
            {
              "type": "object",
              "properties": {
                "resourceId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "revision": {
                  "type": "string",
                  "pattern": "^\\d{1,12}:\\d{1,9}$",
                  "description": "Exact Firestore update revision from crm_lead_edit_context. Refresh after any change."
                },
                "values": {
                  "type": "object",
                  "properties": {
                    "name_lid": {
                      "description": "Native Leads.name_lid.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "customerId": {
                      "description": "Native Leads.customerId. Verified workspace ID.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "name": {
                      "description": "Native Leads.name.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "lastName": {
                      "description": "Native Leads.lastName.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "posicion": {
                      "description": "Native Leads.posicion.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "contacts": {
                      "description": "Native Leads.contacts. Supplied array replaces the whole array.",
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "$ref": "#/$defs/_mcp0"
                          },
                          "name": {
                            "description": "Native contact.name.",
                            "type": "string",
                            "maxLength": 2000
                          },
                          "value": {
                            "description": "Native contact.value.",
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "additionalProperties": false,
                        "description": "Native Leads.contacts."
                      }
                    },
                    "address": {
                      "description": "Native Leads.address.",
                      "type": "object",
                      "properties": {
                        "Number": {
                          "description": "Native Address_json.Number.",
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "Available": {
                          "description": "Native Address_json.Available.",
                          "type": "boolean"
                        },
                        "name": {
                          "description": "Native Address_json.name.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "latLng": {
                          "description": "Native Address_json.latLng. Supplied array replaces the whole array.",
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "number",
                            "description": "Native Address_json.latLng."
                          }
                        },
                        "address": {
                          "description": "Native Address_json.address.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "city": {
                          "description": "Native Address_json.city.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "state": {
                          "description": "Native Address_json.state.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "country": {
                          "description": "Native Address_json.country.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "zipCode": {
                          "description": "Native Address_json.zipCode.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "Apartment": {
                          "description": "Native Address_json.Apartment.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "Code-door": {
                          "description": "Native Address_json.Code-door.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "Comment": {
                          "description": "Native Address_json.Comment.",
                          "type": "string",
                          "maxLength": 12000
                        },
                        "Zone": {
                          "description": "Native Address_json.Zone.",
                          "type": "string",
                          "maxLength": 2000
                        },
                        "tax": {
                          "description": "Native Address_json.tax.",
                          "type": "number"
                        },
                        "view": {
                          "description": "Native Address_json.view.",
                          "type": "string",
                          "maxLength": 2000
                        }
                      },
                      "additionalProperties": false
                    },
                    "company": {
                      "description": "Native Leads.company.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "source": {
                      "description": "Native Leads.source.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "sourceDetail": {
                      "description": "Native Leads.sourceDetail.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "manager": {
                      "description": "Native Leads.manager. Verified workspace ID.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "priority": {
                      "description": "Native Leads.priority.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "segment": {
                      "description": "Native Leads.segment.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "industry": {
                      "description": "Native Leads.industry.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "timezone": {
                      "description": "Native Leads.timezone.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "budget": {
                      "description": "Native Leads.budget.",
                      "type": "number"
                    },
                    "currency": {
                      "description": "Native Leads.currency.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "consentGivenAt": {
                      "description": "Native Leads.consentGivenAt. ISO 8601 with timezone; stored as a timestamp.",
                      "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)))$"
                    },
                    "tags": {
                      "description": "Native Leads.tags. Supplied array replaces the whole array.",
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 2000,
                        "description": "Native Leads.tags."
                      }
                    },
                    "comment": {
                      "description": "Native Leads.comment.",
                      "type": "string",
                      "maxLength": 12000
                    },
                    "fields": {
                      "description": "Native Leads.fields. Supplied array replaces the whole array.",
                      "maxItems": 100,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "date": {
                            "$ref": "#/$defs/_mcp0"
                          },
                          "name": {
                            "description": "Native contact.name.",
                            "type": "string",
                            "maxLength": 2000
                          },
                          "value": {
                            "description": "Native contact.value.",
                            "type": "string",
                            "maxLength": 2000
                          }
                        },
                        "additionalProperties": false,
                        "description": "Native Leads.fields."
                      }
                    },
                    "language": {
                      "description": "Native Leads.language.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "hearus": {
                      "description": "Native Leads.hearus.",
                      "type": "string",
                      "maxLength": 2000
                    },
                    "companyLabel": {
                      "description": "Editable client business name, separate from the tenant company binding.",
                      "type": "string",
                      "maxLength": 500
                    }
                  },
                  "additionalProperties": false,
                  "description": "Editable fields as committed by this operation, not a later current state."
                },
                "fieldErrors": {
                  "description": "Present only when editable fields have incompatible stored values. Those entire fields are omitted from values, not reset. Use this revision and an explicit valid patch to repair them; all other fields remain unchanged.",
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "field": {
                        "type": "string",
                        "description": "Native field path requiring an explicit correction; no stored values are returned."
                      },
                      "expected": {
                        "type": "string",
                        "description": "Required native type or edit bound."
                      },
                      "actual": {
                        "type": "string",
                        "description": "Observed value type, never its content."
                      }
                    },
                    "required": [
                      "field",
                      "expected",
                      "actual"
                    ],
                    "additionalProperties": false
                  }
                },
                "pipelineId": {
                  "description": "Native pipeline ID, if assigned.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stageId": {
                  "description": "Last native status Name; cancel means archived.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "archived": {
                  "type": "boolean",
                  "description": "Whether the last native status is cancel."
                }
              },
              "required": [
                "resourceId",
                "revision",
                "values",
                "pipelineId",
                "stageId",
                "archived"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "leadId": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_~:@+.-]{1,160}$",
                  "description": "Canonical lead ID in the connected company."
                },
                "added": {
                  "type": "boolean",
                  "const": true,
                  "description": "The note was appended exactly once."
                }
              },
              "required": [
                "leadId",
                "added"
              ],
              "additionalProperties": false
            }
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Original immutable write result, or null. Read edit context for current state."
    }
  },
  "required": [
    "state",
    "result"
  ],
  "additionalProperties": false,
  "$defs": {
    "_mcp0": {
      "description": "Native contact.date. ISO 8601 with timezone; stored as a timestamp.",
      "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)))$"
    }
  }
}