# Согласования

> Инструменты раздела «Согласования»: 9

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

## Комментарий к согласованию

`add_approval_comment` · изменяет данные

Описание для модели: Add a comment to the discussion of an approval route. Does not change the route, decisions are recorded with decide_approval.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |
| `text` | string | да | Comment text. Длина: 1–10000. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 10000,
      "description": "Comment text"
    }
  },
  "required": [
    "approval_id",
    "text"
  ],
  "additionalProperties": false
}
```

</details>

## Запустить согласование

`create_approval` · изменяет данные

Описание для модели: Start an approval route for documents or a question. Stages run one after another. Participants of the first stage are notified at once. Without documents the route approves the question stated in title and context.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `title` | string | да | What is being approved. Длина: 1–500. |
| `stages` | массив объектов | да | Stages in the order they run. Элементов: 1–20. |
| `stages[].name` | string | да | Stage name. Длина: 1–200. |
| `stages[].participants` | массив объектов | да | Participants of the stage, at least one decides. Элементов: 1–50. |
| `stages[].participants[].member_id` | string | да | Team member id. Длина: 1–64. |
| `stages[].participants[].role` | string | нет | Decides or only gets acquainted, decides by default. Значения: `Согласует`, `Знакомится`. |
| `stages[].order` | string | нет | How participants act within the stage, all at once by default. Значения: `Одновременно`, `По очереди`, `До первого решения`. |
| `stages[].quorum` | string | нет | Whose approvals complete the stage, everyone by default. Значения: `Все`, `Большинство`. |
| `stages[].remind_after_hours` | integer | нет | Stage deadline in hours; reminders and the overdue notice count from it. Диапазон: 1–8760. |
| `stages[].auto_decision_after_hours` | integer | нет | Hours until the automatic decision. Диапазон: 1–8760. |
| `stages[].auto_decision` | string | нет | Automatic decision, needs auto_decision_after_hours. Значения: `Согласовать`, `Отклонить`. |
| `document_ids` | массив string | нет | Documents to approve. Элементов: 1–20. |
| `context` | string | нет | Explanation for participants. Длина: до 5000. |
| `type` | string | нет | Free-form category of the route. Длина: 1–100. |
| `reminders` | string | нет | Automatic reminders to awaited participants: before_due a working day before the deadline, daily every working day until they decide. Значения: `none`, `before_due`, `daily`. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "What is being approved"
    },
    "stages": {
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Stage name"
          },
          "participants": {
            "minItems": 1,
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "member_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "description": "Team member id"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "Согласует",
                    "Знакомится"
                  ],
                  "description": "Decides or only gets acquainted, decides by default"
                }
              },
              "required": [
                "member_id"
              ],
              "additionalProperties": false
            },
            "description": "Participants of the stage, at least one decides"
          },
          "order": {
            "type": "string",
            "enum": [
              "Одновременно",
              "По очереди",
              "До первого решения"
            ],
            "description": "How participants act within the stage, all at once by default"
          },
          "quorum": {
            "type": "string",
            "enum": [
              "Все",
              "Большинство"
            ],
            "description": "Whose approvals complete the stage, everyone by default"
          },
          "remind_after_hours": {
            "description": "Stage deadline in hours; reminders and the overdue notice count from it",
            "type": "integer",
            "minimum": 1,
            "maximum": 8760
          },
          "auto_decision_after_hours": {
            "description": "Hours until the automatic decision",
            "type": "integer",
            "minimum": 1,
            "maximum": 8760
          },
          "auto_decision": {
            "type": "string",
            "enum": [
              "Согласовать",
              "Отклонить"
            ],
            "description": "Automatic decision, needs auto_decision_after_hours"
          }
        },
        "required": [
          "name",
          "participants"
        ],
        "additionalProperties": false
      },
      "description": "Stages in the order they run"
    },
    "document_ids": {
      "description": "Documents to approve",
      "minItems": 1,
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 64,
        "description": "Document id"
      }
    },
    "context": {
      "description": "Explanation for participants",
      "type": "string",
      "maxLength": 5000
    },
    "type": {
      "description": "Free-form category of the route",
      "type": "string",
      "minLength": 1,
      "maxLength": 100
    },
    "reminders": {
      "description": "Automatic reminders to awaited participants: before_due a working day before the deadline, daily every working day until they decide",
      "type": "string",
      "enum": [
        "none",
        "before_due",
        "daily"
      ]
    }
  },
  "required": [
    "title",
    "stages"
  ],
  "additionalProperties": false
}
```

</details>

## Принять решение по согласованию

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

Описание для модели: Approve or reject an approval route as the current user. Records the decision of the current user in the running stage. A participant who only gets acquainted can only mark it as read. In a stage that runs one by one only the participant named in deciding_now decides. A deputy named in the deputy field decides for an absent participant. A rejection ends the whole route and usually needs a comment with the reason.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |
| `decision` | string | да | Decision of the current user. Значения: `Согласовать`, `Отклонить`, `Отметить ознакомление`. |
| `generation` | integer | да | Execution generation from the reviewed approval card. Диапазон: 0–9007199254740991. |
| `comment` | string | нет | Comment to the decision. Длина: 1–5000. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    },
    "decision": {
      "type": "string",
      "enum": [
        "Согласовать",
        "Отклонить",
        "Отметить ознакомление"
      ],
      "description": "Decision of the current user"
    },
    "generation": {
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991,
      "description": "Execution generation from the reviewed approval card"
    },
    "comment": {
      "description": "Comment to the decision",
      "type": "string",
      "minLength": 1,
      "maxLength": 5000
    }
  },
  "required": [
    "approval_id",
    "decision",
    "generation"
  ],
  "additionalProperties": false
}
```

</details>

## Удалить согласование

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

Описание для модели: Delete an approval route with its stages and history. Cannot be restored. To stop a route and keep it use revoke_approval.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    }
  },
  "required": [
    "approval_id"
  ],
  "additionalProperties": false
}
```

</details>

## Карточка согласования

`get_approval` · только чтение

Описание для модели: Get an approval route with stages and decisions.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |
| `comments` | boolean | нет | Include the discussion, off by default. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    },
    "comments": {
      "description": "Include the discussion, off by default",
      "type": "boolean"
    }
  },
  "required": [
    "approval_id"
  ],
  "additionalProperties": false
}
```

</details>

## Список согласований

`list_approvals` · только чтение

Описание для модели: List approval routes filtered by status, role or document. Set involvement to see routes the current user started or takes part in.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `status` | string | нет | Route status. Значения: `На согласовании`, `Согласовано`, `Отклонено`, `Отозвано`. |
| `involvement` | string | нет | Routes the current user started or takes part in. Значения: `initiator`, `participant`. |
| `document_id` | string | нет | Document id. Длина: 1–64. |
| `limit` | integer | нет | Maximum number of items to return, 20 by default. По умолчанию: `20`. Диапазон: 1–100. |
| `offset` | integer | нет | Number of items to skip, for paging. По умолчанию: `0`. Диапазон: 0–9007199254740991. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "На согласовании",
        "Согласовано",
        "Отклонено",
        "Отозвано"
      ],
      "description": "Route status"
    },
    "involvement": {
      "description": "Routes the current user started or takes part in",
      "type": "string",
      "enum": [
        "initiator",
        "participant"
      ]
    },
    "document_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Document 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
    }
  },
  "additionalProperties": false
}
```

</details>

## Перезапустить согласование

`restart_approval` · изменяет данные

Описание для модели: Restart a rejected or revoked approval route from stage one. Earlier decisions are reset and participants are notified again. After fixing what was rejected use send_revised_approval instead.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    }
  },
  "required": [
    "approval_id"
  ],
  "additionalProperties": false
}
```

</details>

## Отозвать согласование

`revoke_approval` · изменяет данные

Описание для модели: Stop a running approval route, only its initiator can. The route is kept and can be started again with restart_approval.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |
| `reason` | string | нет | Reason shown to participants. Длина: 1–2000. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    },
    "reason": {
      "description": "Reason shown to participants",
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    }
  },
  "required": [
    "approval_id"
  ],
  "additionalProperties": false
}
```

</details>

## Отправить согласование после доработки

`send_revised_approval` · изменяет данные

Описание для модели: Send a rejected approval again after corrections. Use after fixing what was rejected in the document. The route continues from the stage that rejected, earlier stages keep their decisions. The note explains what was fixed and is posted to the discussion.

**Параметры**

| Параметр | Тип | Обязательный | Описание |
| --- | --- | --- | --- |
| `approval_id` | string | да | Approval id. Длина: 1–64. |
| `note` | string | нет | What was fixed, shown to participants. Длина: 1–4000. |

<details>
<summary>JSON Schema параметров</summary>

```json
{
  "type": "object",
  "properties": {
    "approval_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 64,
      "description": "Approval id"
    },
    "note": {
      "description": "What was fixed, shown to participants",
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    }
  },
  "required": [
    "approval_id"
  ],
  "additionalProperties": false
}
```

</details>
