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

Автоматизации

Инструменты раздела «Автоматизации»: 12

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

Удалить автоматизацию

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

Описание для модели: Delete an automation. Cannot be restored.

Параметры

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

Справочник действий автоматизаций

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

Описание для модели: Describe actions available for building automations. Without arguments returns the index of categories and types together with the condition operators allowed per data type. With type returns its actions. With type and action returns the settings schema, the outputs and the output fields. The uses of a step is type.action.

Параметры

ПараметрТипОбязательныйОписание
typestringнетType of the node, for example documents or tasks. Длина: 1–100.
actionstringнетKey of the action within the type. Длина: 1–100.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "type": {
      "description": "Type of the node, for example documents or tasks",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "action": {
      "description": "Key of the action within the type",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    }
  },
  "additionalProperties": false
}

Справочник триггеров автоматизаций

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

Описание для модели: Describe triggers that start automations and their data. The uses of a trigger is manual, schedule, event or webhook; settings is the JSON schema of its with. For event the catalog lists the sources, the events and the data of each event; sourceId * means any source. A schedule without scheduleDataSource only fires at the time.

Параметры

Параметров нет.

JSON Schema параметров
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}

Устройство автоматизации

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

Описание для модели: Get an automation as steps and links, ready for editing. Pass the steps and links back to save_automation to change the automation, keep ref of untouched steps.

Параметры

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

Журнал запуска автоматизации

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

Описание для модели: Get one run of an automation with the log of its steps. While the status says the run goes on, ask again later. Input and output of steps come only to those who may edit the automation; simulated steps of a test run did not touch any data.

Параметры

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

История запусков автоматизации

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

Описание для модели: List runs of an automation, newest first.

Параметры

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

Список автоматизаций

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

Описание для модели: List automations of the team, optionally by status or text.

Параметры

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

Запустить автоматизацию

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

Описание для модели: Start one run of an automation by hand. Works for drafts too. The run goes on in the background, read its result with get_automation_run. In test mode reads run for real while writes and sends are simulated from the output schema and marked as such; without trigger_data the test takes the pinned sample of trigger data (the last real event or the sample set with set_automation_test_data).

Параметры

ПараметрТипОбязательныйОписание
automation_idstringдаAutomation id. Длина: 1–64.
modestringнетlive runs every step, test simulates writes and sends. Значения: live, test. По умолчанию: live.
trigger_dataобъектнетData available to steps as trigger.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "automation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Automation id"
    },
    "mode": {
      "default": "live",
      "description": "live runs every step, test simulates writes and sends",
      "type": "string",
      "enum": [
        "live",
        "test"
      ]
    },
    "trigger_data": {
      "description": "Data available to steps as trigger",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "automation_id"
  ],
  "additionalProperties": false
}

Сохранить автоматизацию

save_automation · изменяет данные · только для агентов платформы

Описание для модели: Create or change an automation from steps and links. Data references are {{ steps.ref.field }}, {{ trigger.field }} and {{ item }}. To change an automation take steps and links from get_automation and keep ref of untouched steps. Without steps only the name and the description change. A new automation is a draft, turn it on with set_automation_active after the user agrees.

Параметры

ПараметрТипОбязательныйОписание
automation_idstringнетAutomation to change, empty to create a new one. Длина: 1–64.
namestringнетName of the automation. Длина: 1–300.
descriptionstringнетDescription. Длина: до 5000.
stepsмассив объектовнетSteps of the automation. Элементов: 1–200.
steps[].refstringдаStable unique id of the step in latin letters, digits and underscore, not trigger, item, index or now. Длина: 1–60.
steps[].usesstringдаWhat the step does, type.action for an action or the name of a trigger or logic. Длина: 1–120.
steps[].labelstringнетName of the step shown to people. Длина: до 200.
steps[].withобъектнетSettings of the action, strings may hold references.
steps[].whenобъектнетCondition of a condition step: comparisons joined by all (and) or any (or).
steps[].when.matchstringнетall: every condition must hold; any: at least one. Значения: all, any. По умолчанию: all.
steps[].when.conditionsмассив объектовдаComparisons of the condition. Элементов: 1–50.
steps[].when.conditions[].variablestringдаReference to data without braces: trigger.<field>, <step ref>.<field>, item.<field>, now. Длина: 1–200.
steps[].when.conditions[].operatorstringдаComparison operator from the operator catalog. Значения: is, isNot, isOneOf, isNoneOf, isFilled, isEmpty, contains, notContains, beginsWith, endsWith, gt, gte, lt, lte, between, earlierThan, laterThan, on, earlierThanOrOn, laterThanOrOn.
steps[].when.conditions[].valuestring или number или boolean или массив string или numberнетLiteral to compare with; a list for isOneOf, isNoneOf and between; omitted for isFilled and isEmpty.
steps[].when.conditions[].refstringнетReference to compare with instead of a literal value. Длина: 1–200.
steps[].forEachstringнетData to repeat over, for a loop step. Длина: до 2000.
steps[].durationstringнетISO 8601 duration, for a wait step. Длина: до 60.
steps[].onErrorstringнетWhat an action does when it fails: stop the branch (default) or route to its error output. Значения: stop, route.
linksмассив объектовнетLinks between the steps. Элементов: до 500.
links[].fromstringдаref of the source step. Длина: 1–60.
links[].tostringдаref of the target step. Длина: 1–60.
links[].onstringнетOutput port: main by default; true or false for a condition; loop or done for a loop; done, rejected or timeout for an approval, a signature or an agent task; error for a step with onError route. Длина: до 30.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "automation_id": {
      "description": "Automation to change, empty to create a new one",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "name": {
      "description": "Name of the automation",
      "type": "string",
      "minLength": 1,
      "maxLength": 300
    },
    "description": {
      "description": "Description",
      "type": "string",
      "maxLength": 5000
    },
    "steps": {
      "description": "Steps of the automation",
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "Stable unique id of the step in latin letters, digits and underscore, not trigger, item, index or now"
          },
          "uses": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "What the step does, type.action for an action or the name of a trigger or logic"
          },
          "label": {
            "description": "Name of the step shown to people",
            "type": "string",
            "maxLength": 200
          },
          "with": {
            "description": "Settings of the action, strings may hold references",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "when": {
            "description": "Condition of a condition step: comparisons joined by all (and) or any (or)",
            "type": "object",
            "properties": {
              "match": {
                "default": "all",
                "description": "all: every condition must hold; any: at least one",
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "conditions": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "variable": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "description": "Reference to data without braces: trigger.<field>, <step ref>.<field>, item.<field>, now"
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "is",
                        "isNot",
                        "isOneOf",
                        "isNoneOf",
                        "isFilled",
                        "isEmpty",
                        "contains",
                        "notContains",
                        "beginsWith",
                        "endsWith",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "between",
                        "earlierThan",
                        "laterThan",
                        "on",
                        "earlierThanOrOn",
                        "laterThanOrOn"
                      ],
                      "description": "Comparison operator from the operator catalog"
                    },
                    "value": {
                      "description": "Literal to compare with; a list for isOneOf, isNoneOf and between; omitted for isFilled and isEmpty",
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            }
                          ]
                        },
                        {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2000
                              },
                              {
                                "type": "number"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "ref": {
                      "description": "Reference to compare with instead of a literal value",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "variable",
                    "operator"
                  ],
                  "additionalProperties": false
                },
                "description": "Comparisons of the condition"
              }
            },
            "required": [
              "conditions"
            ],
            "additionalProperties": false
          },
          "forEach": {
            "description": "Data to repeat over, for a loop step",
            "type": "string",
            "maxLength": 2000
          },
          "duration": {
            "description": "ISO 8601 duration, for a wait step",
            "type": "string",
            "maxLength": 60
          },
          "onError": {
            "description": "What an action does when it fails: stop the branch (default) or route to its error output",
            "type": "string",
            "enum": [
              "stop",
              "route"
            ]
          }
        },
        "required": [
          "ref",
          "uses"
        ],
        "additionalProperties": false
      }
    },
    "links": {
      "description": "Links between the steps",
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "ref of the source step"
          },
          "to": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "ref of the target step"
          },
          "on": {
            "description": "Output port: main by default; true or false for a condition; loop or done for a loop; done, rejected or timeout for an approval, a signature or an agent task; error for a step with onError route",
            "type": "string",
            "maxLength": 30
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}

Включить или выключить автоматизацию

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

Описание для модели: Turn an automation on or off. An automation that is on fires by its triggers and acts for real.

Параметры

ПараметрТипОбязательныйОписание
automation_idstringдаAutomation id. Длина: 1–64.
activebooleanдаTrue turns the automation on, false turns it off.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "automation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Automation id"
    },
    "active": {
      "type": "boolean",
      "description": "True turns the automation on, false turns it off"
    }
  },
  "required": [
    "automation_id",
    "active"
  ],
  "additionalProperties": false
}

Задать данные для теста автоматизации

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

Описание для модели: Pin trigger data used by test runs of an automation. Keys follow the trigger fields from describe_automation_triggers. Leave data out to drop the manual sample and fall back to the last real event. Binary content is never pinned.

Параметры

ПараметрТипОбязательныйОписание
automation_idstringдаAutomation id. Длина: 1–64.
dataобъектнетTrigger data for test runs; without it the manual sample is dropped.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "automation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Automation id"
    },
    "data": {
      "description": "Trigger data for test runs; without it the manual sample is dropped",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "automation_id"
  ],
  "additionalProperties": false
}

Проверить автоматизацию

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

Описание для модели: Check an automation or a draft of steps without saving. Pass steps and links to check a draft, or automation_id to check a saved automation.

Параметры

ПараметрТипОбязательныйОписание
automation_idstringнетAutomation id. Длина: 1–64.
stepsмассив объектовнетSteps of the draft. Элементов: 1–200.
steps[].refstringдаStable unique id of the step in latin letters, digits and underscore, not trigger, item, index or now. Длина: 1–60.
steps[].usesstringдаWhat the step does, type.action for an action or the name of a trigger or logic. Длина: 1–120.
steps[].labelstringнетName of the step shown to people. Длина: до 200.
steps[].withобъектнетSettings of the action, strings may hold references.
steps[].whenобъектнетCondition of a condition step: comparisons joined by all (and) or any (or).
steps[].when.matchstringнетall: every condition must hold; any: at least one. Значения: all, any. По умолчанию: all.
steps[].when.conditionsмассив объектовдаComparisons of the condition. Элементов: 1–50.
steps[].when.conditions[].variablestringдаReference to data without braces: trigger.<field>, <step ref>.<field>, item.<field>, now. Длина: 1–200.
steps[].when.conditions[].operatorstringдаComparison operator from the operator catalog. Значения: is, isNot, isOneOf, isNoneOf, isFilled, isEmpty, contains, notContains, beginsWith, endsWith, gt, gte, lt, lte, between, earlierThan, laterThan, on, earlierThanOrOn, laterThanOrOn.
steps[].when.conditions[].valuestring или number или boolean или массив string или numberнетLiteral to compare with; a list for isOneOf, isNoneOf and between; omitted for isFilled and isEmpty.
steps[].when.conditions[].refstringнетReference to compare with instead of a literal value. Длина: 1–200.
steps[].forEachstringнетData to repeat over, for a loop step. Длина: до 2000.
steps[].durationstringнетISO 8601 duration, for a wait step. Длина: до 60.
steps[].onErrorstringнетWhat an action does when it fails: stop the branch (default) or route to its error output. Значения: stop, route.
linksмассив объектовнетLinks of the draft. Элементов: до 500.
links[].fromstringдаref of the source step. Длина: 1–60.
links[].tostringдаref of the target step. Длина: 1–60.
links[].onstringнетOutput port: main by default; true or false for a condition; loop or done for a loop; done, rejected or timeout for an approval, a signature or an agent task; error for a step with onError route. Длина: до 30.
JSON Schema параметров
{
  "type": "object",
  "properties": {
    "automation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Automation id"
    },
    "steps": {
      "description": "Steps of the draft",
      "minItems": 1,
      "maxItems": 200,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ref": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "Stable unique id of the step in latin letters, digits and underscore, not trigger, item, index or now"
          },
          "uses": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120,
            "description": "What the step does, type.action for an action or the name of a trigger or logic"
          },
          "label": {
            "description": "Name of the step shown to people",
            "type": "string",
            "maxLength": 200
          },
          "with": {
            "description": "Settings of the action, strings may hold references",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "when": {
            "description": "Condition of a condition step: comparisons joined by all (and) or any (or)",
            "type": "object",
            "properties": {
              "match": {
                "default": "all",
                "description": "all: every condition must hold; any: at least one",
                "type": "string",
                "enum": [
                  "all",
                  "any"
                ]
              },
              "conditions": {
                "minItems": 1,
                "maxItems": 50,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "variable": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200,
                      "description": "Reference to data without braces: trigger.<field>, <step ref>.<field>, item.<field>, now"
                    },
                    "operator": {
                      "type": "string",
                      "enum": [
                        "is",
                        "isNot",
                        "isOneOf",
                        "isNoneOf",
                        "isFilled",
                        "isEmpty",
                        "contains",
                        "notContains",
                        "beginsWith",
                        "endsWith",
                        "gt",
                        "gte",
                        "lt",
                        "lte",
                        "between",
                        "earlierThan",
                        "laterThan",
                        "on",
                        "earlierThanOrOn",
                        "laterThanOrOn"
                      ],
                      "description": "Comparison operator from the operator catalog"
                    },
                    "value": {
                      "description": "Literal to compare with; a list for isOneOf, isNoneOf and between; omitted for isFilled and isEmpty",
                      "anyOf": [
                        {
                          "anyOf": [
                            {
                              "type": "string",
                              "maxLength": 2000
                            },
                            {
                              "type": "number"
                            },
                            {
                              "type": "boolean"
                            }
                          ]
                        },
                        {
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2000
                              },
                              {
                                "type": "number"
                              }
                            ]
                          }
                        }
                      ]
                    },
                    "ref": {
                      "description": "Reference to compare with instead of a literal value",
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "variable",
                    "operator"
                  ],
                  "additionalProperties": false
                },
                "description": "Comparisons of the condition"
              }
            },
            "required": [
              "conditions"
            ],
            "additionalProperties": false
          },
          "forEach": {
            "description": "Data to repeat over, for a loop step",
            "type": "string",
            "maxLength": 2000
          },
          "duration": {
            "description": "ISO 8601 duration, for a wait step",
            "type": "string",
            "maxLength": 60
          },
          "onError": {
            "description": "What an action does when it fails: stop the branch (default) or route to its error output",
            "type": "string",
            "enum": [
              "stop",
              "route"
            ]
          }
        },
        "required": [
          "ref",
          "uses"
        ],
        "additionalProperties": false
      }
    },
    "links": {
      "description": "Links of the draft",
      "maxItems": 500,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "ref of the source step"
          },
          "to": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60,
            "description": "ref of the target step"
          },
          "on": {
            "description": "Output port: main by default; true or false for a condition; loop or done for a loop; done, rejected or timeout for an approval, a signature or an agent task; error for a step with onError route",
            "type": "string",
            "maxLength": 30
          }
        },
        "required": [
          "from",
          "to"
        ],
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}

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