Перейти к содержимому
LegalStack

Формы

Инструменты раздела «Формы»: 8

Подключение: https://mcp.legalstack.ru/mcp/interfaces или в составе общего подключения https://mcp.legalstack.ru/mcp.

Создать форму

create_interface · изменяет данные

Описание для модели: Create a form. The form is not published, publish it with publish_interface.

Параметры

ПараметрТипОбязательныйОписание
titlestringдаTitle. Длина: 1–300.
fieldsмассив объектовдаFields in the order they are shown. Элементов: 1–200.
fields[].labelstringдаCaption of the field. Длина: 1–300.
fields[].kindstringдаKind of the field. Значения: Текст, Число, Дата, Выбор, Флажок, Файл.
fields[].keystringнетKey of the field, equal to the key of a registry field to fill that field. Длина: 1–100.
fields[].requiredbooleanнетThe field must be filled.
fields[].placeholderstringнетHint inside the empty field. Длина: до 300.
fields[].optionsмассив stringнетChoices of a select field. Элементов: 1–200.
descriptionstringнетDescription shown to the person who fills the form. Длина: до 5000.
registry_idstringнетRegistry that receives answers as records, fields match by key. Длина: 1–64.
document_idstringнетDocument template filled from the answers. Длина: 1–64.
success_messagestringнетMessage shown after the form is sent. Длина: до 1000.
submit_buttonstringнетText of the send button. Длина: до 100.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 300,
      "description": "Title"
    },
    "fields": {
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "description": "Caption of the field"
          },
          "kind": {
            "type": "string",
            "enum": [
              "Текст",
              "Число",
              "Дата",
              "Выбор",
              "Флажок",
              "Файл"
            ],
            "description": "Kind of the field"
          },
          "key": {
            "description": "Key of the field, equal to the key of a registry field to fill that field",
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "required": {
            "description": "The field must be filled",
            "type": "boolean"
          },
          "placeholder": {
            "description": "Hint inside the empty field",
            "type": "string",
            "maxLength": 300
          },
          "options": {
            "description": "Choices of a select field",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          }
        },
        "required": [
          "label",
          "kind"
        ],
        "additionalProperties": false
      },
      "description": "Fields in the order they are shown"
    },
    "description": {
      "description": "Description shown to the person who fills the form",
      "type": "string",
      "maxLength": 5000
    },
    "registry_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Registry that receives answers as records, fields match by key"
    },
    "document_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Document template filled from the answers"
    },
    "success_message": {
      "type": "string",
      "maxLength": 1000,
      "description": "Message shown after the form is sent"
    },
    "submit_button": {
      "type": "string",
      "maxLength": 100,
      "description": "Text of the send button"
    }
  },
  "required": [
    "title",
    "fields"
  ],
  "additionalProperties": false
}

Удалить форму

delete_interface · необратимое действие

Описание для модели: Delete a form, its public link stops working. Cannot be restored.

Параметры

ПараметрТипОбязательныйОписание
interface_idstringдаInterface id. Длина: 1–64.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "interface_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Interface id"
    }
  },
  "required": [
    "interface_id"
  ],
  "additionalProperties": false
}

Карточка формы

get_interface · только чтение

Описание для модели: Get a form with its fields and publication.

Параметры

ПараметрТипОбязательныйОписание
interface_idstringдаInterface id. Длина: 1–64.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "interface_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Interface id"
    }
  },
  "required": [
    "interface_id"
  ],
  "additionalProperties": false
}

Ответ на форму

get_interface_submission · только чтение

Описание для модели: Get one answer submitted to a form.

Параметры

ПараметрТипОбязательныйОписание
interface_idstringдаInterface id. Длина: 1–64.
submission_idstringдаSubmission id. Длина: 1–64.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "interface_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Interface id"
    },
    "submission_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Submission id"
    }
  },
  "required": [
    "interface_id",
    "submission_id"
  ],
  "additionalProperties": false
}

Ответы на форму

list_interface_submissions · только чтение

Описание для модели: List answers submitted to a form, newest first. Answers are typed by outside people. Each answer is also a record of the registry bound to the form, change or delete it with the registry tools.

Параметры

ПараметрТипОбязательныйОписание
interface_idstringдаInterface id. Длина: 1–64.
limitintegerнетMaximum number of items to return, 20 by default. По умолчанию: 20. Диапазон: 1–100.
offsetintegerнетNumber of items to skip, for paging. По умолчанию: 0. Диапазон: 0–9007199254740991.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "interface_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Interface id"
    },
    "limit": {
      "default": 20,
      "description": "Maximum number of items to return, 20 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "default": 0,
      "description": "Number of items to skip, for paging",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "interface_id"
  ],
  "additionalProperties": false
}

Формы и интерфейсы

list_interfaces · только чтение

Описание для модели: List forms, optionally matching a text.

Параметры

ПараметрТипОбязательныйОписание
querystringнетWords from the title or the description. Длина: 1–200.
limitintegerнетMaximum number of items to return, 50 by default. По умолчанию: 50. Диапазон: 1–200.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "query": {
      "description": "Words from the title or the description",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "limit": {
      "default": 50,
      "description": "Maximum number of items to return, 50 by default",
      "type": "integer",
      "minimum": 1,
      "maximum": 200
    }
  },
  "additionalProperties": false
}

Опубликовать форму

publish_interface · изменяет данные

Описание для модели: Publish a form on a channel or take the publication down. A published form is open to anyone with the link. The result carries the public path and the form token for send_telegram_form.

Параметры

ПараметрТипОбязательныйОписание
interface_idstringдаInterface id. Длина: 1–64.
channelstringнетChannel, a web page by default. Значения: Веб-страница, Встраивание на сайт, Telegram, API.
publishedbooleanнетFalse takes the publication down, true by default.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "interface_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Interface id"
    },
    "channel": {
      "type": "string",
      "enum": [
        "Веб-страница",
        "Встраивание на сайт",
        "Telegram",
        "API"
      ],
      "description": "Channel, a web page by default"
    },
    "published": {
      "description": "False takes the publication down, true by default",
      "type": "boolean"
    }
  },
  "required": [
    "interface_id"
  ],
  "additionalProperties": false
}

Изменить форму

update_interface · изменяет данные

Описание для модели: Update the title, fields or links of a form. Pass only what changes. fields replaces the whole set of fields, so pass every field that must stay. List links to drop in unlink.

Параметры

ПараметрТипОбязательныйОписание
interface_idstringдаInterface id. Длина: 1–64.
titlestringнетNew title. Длина: 1–300.
descriptionstringнетNew description. Длина: до 5000.
fieldsмассив объектовнетNew full set of fields. Элементов: 1–200.
fields[].labelstringдаCaption of the field. Длина: 1–300.
fields[].kindstringдаKind of the field. Значения: Текст, Число, Дата, Выбор, Флажок, Файл.
fields[].keystringнетKey of the field, equal to the key of a registry field to fill that field. Длина: 1–100.
fields[].requiredbooleanнетThe field must be filled.
fields[].placeholderstringнетHint inside the empty field. Длина: до 300.
fields[].optionsмассив stringнетChoices of a select field. Элементов: 1–200.
registry_idstringнетRegistry that receives answers as records, fields match by key. Длина: 1–64.
document_idstringнетDocument template filled from the answers. Длина: 1–64.
success_messagestringнетMessage shown after the form is sent. Длина: до 1000.
submit_buttonstringнетText of the send button. Длина: до 100.
unlinkмассив stringнетLinks to drop. Элементов: от 1.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "interface_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Interface id"
    },
    "title": {
      "description": "New title",
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "description": {
      "description": "New description",
      "type": "string",
      "maxLength": 5000
    },
    "fields": {
      "description": "New full set of fields",
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300,
            "description": "Caption of the field"
          },
          "kind": {
            "type": "string",
            "enum": [
              "Текст",
              "Число",
              "Дата",
              "Выбор",
              "Флажок",
              "Файл"
            ],
            "description": "Kind of the field"
          },
          "key": {
            "description": "Key of the field, equal to the key of a registry field to fill that field",
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "required": {
            "description": "The field must be filled",
            "type": "boolean"
          },
          "placeholder": {
            "description": "Hint inside the empty field",
            "type": "string",
            "maxLength": 300
          },
          "options": {
            "description": "Choices of a select field",
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          }
        },
        "required": [
          "label",
          "kind"
        ],
        "additionalProperties": false
      }
    },
    "registry_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Registry that receives answers as records, fields match by key"
    },
    "document_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Document template filled from the answers"
    },
    "success_message": {
      "type": "string",
      "maxLength": 1000,
      "description": "Message shown after the form is sent"
    },
    "submit_button": {
      "type": "string",
      "maxLength": 100,
      "description": "Text of the send button"
    },
    "unlink": {
      "description": "Links to drop",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "registry",
          "document"
        ]
      }
    }
  },
  "required": [
    "interface_id"
  ],
  "additionalProperties": false
}

На этой странице