Skip to main content
Glama

Создать или сохранить сценарий

flows_save

Save a new or modified flow scenario for a Telegram bot by providing the full graph and version, creating or overwriting as needed.

Instructions

Без параметра flow создаёт сценарий — пустой, из переданного графа или копией другого (copy_of). С параметром flow перезаписывает его. Граф передаётся ЦЕЛИКОМ: чтобы поправить один узел, сначала прочитайте сценарий через flows_get и пришлите изменённый список полностью вместе с version прочитанной редакции. При конфликте перечитайте и объедините правки. Не переданные nodes/edges/comments/viewport сохраняются. Новая редакция создаётся, только если граф действительно изменился. Готовые сценарии — «Консультант с ИИ», «Заявка», «Запись на визит» и другие — здесь не создаются: их ставят из маркета через market_install. При создании без copy_of первый сценарий своего вида включается автоматически только с правом flow.publish; без него остаётся черновиком. Копии остаются черновиками. Включить сценарий — flows_publish.

Input Schema

NameRequiredDescriptionDefault
botYesБот: название, @username или идентификатор.
caseNoДело: название или идентификатор. Если не указать, берётся дело по умолчанию, иначе последнее открытое в панели.
flowNoКакой сценарий перезаписать. Не указывайте для нового.
nameNoНазвание сценария.
edgesNoЗаменить список связей целиком.
nodesNoЗаменить список узлов целиком.
scopeNoДля какой переписки: dialog — личная (по умолчанию), community — сообщества: группы и каналы. Узлы сообществ (trigger.member, trigger.post, action.kick и другие) есть только у community, «Анкета» и «Кнопки под полем ввода» — только у dialog; каталог под вид — operbots_catalog what=node_kinds scope=…. Сменить вид можно только у выключенного сценария.
commentNoКомментарий к редакции.
copy_ofNoСкопировать существующий сценарий вместо создания пустого. Название копии — в name; без него будет «… — копия».
versionNoОжидаемая редакция из flows_get. Обязательна при правке графа существующего сценария.
commentsNoКомментарии полотна целиком. [] удаляет все; без поля сохраняются.
templateNoУстаревшее поле создания: blank.
viewportNoПоложение полотна. Без поля сохраняется прежнее.
descriptionNoОписание.
provider_idNoУстаревшее поле создания: ID ИИ-сервиса. Текущая панель не использует его.
knowledge_base_idNoУстаревшее поле создания: ID базы знаний. Текущая панель не использует его.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.2
    • addedInput schema / properties / copy_of / minLength
      Added value: +1
    • addedInput schema / properties / flow / minLength
      Added value: +1
    • addedInput schema / properties / version
      Added value: +{
      +  "description": "Ожидаемая редакция из flows_get. Обязательна при правке графа существующего сценария.",
      +  "maximum": 9007199254740991,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed30 schema fields changedv0.2.0
    • addedInput schema / properties / comment / anyOf
      Added value: +[
      +  {
      +    "maxLength": 240,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / comment / maxLength
      Removed value: -240
    • removedInput schema / properties / comment / type
      Removed value: -"string"
    • addedInput schema / properties / comments
      Added value: +{
      +  "description": "Комментарии полотна целиком. [] удаляет все; без поля сохраняются.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "color": {
      +        "enum": [
      +          "signal",
      +          "sky",
      +          "violet",
      +          "amber",
      +          "emerald",
      +          "rose",
      +          "slate"
      +        ],
      +        "type": "string"
      +      },
      +      "id": {
      +        "maxLength": 64,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "text": {
      +        "maxLength": 10000,
      +        "type": "string"
      +      },
      +      "x": {
      +        "type": "number"
      +      },
      +      "y": {
      +        "type": "number"
      +      }
      +    },
      +    "required": [
      +      "id"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 500,
      +  "type": "array"
      +}
    • addedInput schema / properties / description / anyOf
      Added value: +[
      +  {
      +    "maxLength": 2000,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / description / maxLength
      Removed value: -2000
    • removedInput schema / properties / description / type
      Removed value: -"string"
    • changedInput schema / properties / edges / description
      Previous value: -"Связи между узлами целиком."New value: +"Заменить список связей целиком."
    • addedInput schema / properties / edges / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / edges / items / properties / data
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Оформление связи целиком. Без data прежнее оформление сохраняется.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / edges / items / properties / in
      Added value: +{
      +  "description": "Вход приёмника; null — стандартный вход.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / edges / items / properties / label / description
      Previous value: -"Подпись на связи."New value: +"Подпись связи; null снимает её."
    • changedInput schema / properties / edges / items / properties / label / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedInput schema / properties / edges / items / properties / out / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedInput schema / properties / edges / maxItems
      Added value: +4000
    • addedInput schema / properties / knowledge_base_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "uuid",
      +      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Устаревшее поле создания: ID базы знаний. Текущая панель не использует его."
      +}
    • changedInput schema / properties / nodes / description
      Previous value: -"Узлы сценария целиком."New value: +"Заменить список узлов целиком."
    • addedInput schema / properties / nodes / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / nodes / items / properties / data
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Оформление карточки целиком. Без data прежнее оформление сохраняется.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / nodes / items / properties / height
      Added value: +{
      +  "description": "Высота карточки; null снимает размер.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / nodes / items / properties / kind / anyOf
      Added value: +[
      +  {
      +    "enum": [
      +      "trigger.command",
      +      "trigger.text",
      +      "trigger.callback",
      +      "trigger.media",
      +      "trigger.event",
      +      "trigger.fallback",
      +      "action.message",
      +      "action.ai",
      +      "action.condition",
      +      "action.switch",
      +      "action.edit",
      +      "action.delete",
      +      "action.set_variable",
      +      "action.marks",
      +      "action.delay",
      +      "action.request",
      +      "action.request_create",
      +      "action.request_update",
      +      "action.request_task",
      +      "action.handoff",
      +      "action.notify",
      +      "action.jump",
      +      "action.menu",
      +      "action.wait",
      +      "action.validate",
      +      "action.media",
      +      "action.schedule",
      +      "action.subscription",
      +      "action.report",
      +      "action.attempts",
      +      "action.reset",
      +      "action.compute",
      +      "action.keyboard",
      +      "action.form",
      +      "action.contact",
      +      "action.poll",
      +      "action.hours",
      +      "action.parse_date",
      +      "action.format_date",
      +      "action.schedule_at",
      +      "trigger.member",
      +      "trigger.post",
      +      "action.kick",
      +      "action.mute",
      +      "action.pin",
      +      "action.chat_title",
      +      "action.invite_link",
      +      "action.is_admin",
      +      "flow.split",
      +      "flow.merge",
      +      "flow.end"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "enum": [
      +      "extension.unconfigured",
      +      "extension_trigger.unconfigured"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "pattern": "^(extension|extension_trigger)\\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / nodes / items / properties / kind / description
      Previous value: -"Что делает узел."New value: +"Вид узла. Операции расширений: extension.UUID или extension_trigger.UUID."
    • removedInput schema / properties / nodes / items / properties / kind / enum
      Removed value: -[
      -  "trigger.command",
      -  "trigger.text",
      -  "trigger.callback",
      -  "trigger.media",
      -  "trigger.event",
      -  "trigger.fallback",
      -  "action.message",
      -  "action.ai",
      -  "action.condition",
      -  "action.switch",
      -  "action.edit",
      -  "action.delete",
      -  "action.set_variable",
      -  "action.marks",
      -  "action.delay",
      -  "action.request",
      -  "action.handoff",
      -  "action.notify",
      -  "action.jump",
      -  "action.menu",
      -  "action.wait",
      -  "action.validate",
      -  "action.media",
      -  "action.schedule",
      -  "action.subscription",
      -  "action.report",
      -  "action.attempts",
      -  "action.reset",
      -  "action.compute",
      -  "action.keyboard",
      -  "action.form",
      -  "action.contact",
      -  "action.poll",
      -  "action.hours",
      -  "action.parse_date",
      -  "action.format_date",
      -  "action.schedule_at",
      -  "trigger.member",
      -  "trigger.post",
      -  "action.kick",
      -  "action.mute",
      -  "action.pin",
      -  "action.chat_title",
      -  "action.invite_link",
      -  "action.is_admin",
      -  "flow.split",
      -  "flow.merge",
      -  "flow.end"
      -]
    • removedInput schema / properties / nodes / items / properties / kind / type
      Removed value: -"string"
    • addedInput schema / properties / nodes / items / properties / type
      Added value: +{
      +  "description": "Тип карточки полотна; по умолчанию operbots.",
      +  "type": "string"
      +}
    • addedInput schema / properties / nodes / items / properties / width
      Added value: +{
      +  "description": "Ширина карточки; null снимает размер.",
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / nodes / maxItems
      Added value: +2000
    • addedInput schema / properties / provider_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "uuid",
      +      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Устаревшее поле создания: ID ИИ-сервиса. Текущая панель не использует его."
      +}
    • addedInput schema / properties / template
      Added value: +{
      +  "description": "Устаревшее поле создания: blank.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / viewport
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Положение полотна. Без поля сохраняется прежнее.",
      +  "properties": {
      +    "x": {
      +      "type": "number"
      +    },
      +    "y": {
      +      "type": "number"
      +    },
      +    "zoom": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "x",
      +    "y",
      +    "zoom"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv0.1.17
    • changedInput schema / properties / nodes / items / properties / kind / enum
      Previous value: -[
      -  "trigger.command",
      -  "trigger.text",
      -  "trigger.callback",
      -  "trigger.media",
      -  "trigger.event",
      -  "trigger.fallback",
      -  "action.message",
      -  "action.ai",
      -  "action.condition",
      -  "action.switch",
      -  "action.edit",
      -  "action.delete",
      -  "action.set_variable",
      -  "action.marks",
      -  "action.delay",
      -  "action.request",
      -  "action.handoff",
      -  "action.notify",
      -  "action.jump",
      -  "action.menu",
      -  "action.wait",
      -  "action.validate",
      -  "action.media",
      -  "action.schedule",
      -  "action.subscription",
      -  "action.report",
      -  "action.attempts",
      -  "action.reset",
      -  "action.compute",
      -  "action.keyboard",
      -  "action.form",
      -  "action.contact",
      -  "action.poll",
      -  "action.hours",
      -  "action.parse_date",
      -  "action.format_date",
      -  "action.schedule_at",
      -  "flow.split",
      -  "flow.merge",
      -  "flow.end"
      -]New value: +[
      +  "trigger.command",
      +  "trigger.text",
      +  "trigger.callback",
      +  "trigger.media",
      +  "trigger.event",
      +  "trigger.fallback",
      +  "action.message",
      +  "action.ai",
      +  "action.condition",
      +  "action.switch",
      +  "action.edit",
      +  "action.delete",
      +  "action.set_variable",
      +  "action.marks",
      +  "action.delay",
      +  "action.request",
      +  "action.handoff",
      +  "action.notify",
      +  "action.jump",
      +  "action.menu",
      +  "action.wait",
      +  "action.validate",
      +  "action.media",
      +  "action.schedule",
      +  "action.subscription",
      +  "action.report",
      +  "action.attempts",
      +  "action.reset",
      +  "action.compute",
      +  "action.keyboard",
      +  "action.form",
      +  "action.contact",
      +  "action.poll",
      +  "action.hours",
      +  "action.parse_date",
      +  "action.format_date",
      +  "action.schedule_at",
      +  "trigger.member",
      +  "trigger.post",
      +  "action.kick",
      +  "action.mute",
      +  "action.pin",
      +  "action.chat_title",
      +  "action.invite_link",
      +  "action.is_admin",
      +  "flow.split",
      +  "flow.merge",
      +  "flow.end"
      +]
    • addedInput schema / properties / scope
      Added value: +{
      +  "description": "Для какой переписки: dialog — личная (по умолчанию), community — сообщества: группы и каналы. Узлы сообществ (trigger.member, trigger.post, action.kick и другие) есть только у community, «Анкета» и «Кнопки под полем ввода» — только у dialog; каталог под вид — operbots_catalog what=node_kinds scope=…. Сменить вид можно только у выключенного сценария.",
      +  "enum": [
      +    "dialog",
      +    "community"
      +  ],
      +  "type": "string"
      +}
  4. Changed5 schema fields changedv0.1.16
    • changedInput schema / properties / copy_of / description
      Previous value: -"Скопировать существующий сценарий вместо создания пустого."New value: +"Скопировать существующий сценарий вместо создания пустого. Название копии — в name; без него будет «… — копия»."
    • removedInput schema / properties / knowledge_base
      Removed value: -{
      -  "description": "База знаний для узлов «Ответ ИИ» из заготовки: название или идентификатор. Без неё консультант отвечает «из головы». Учитывается только при создании из заготовки.",
      -  "type": "string"
      -}
    • changedInput schema / properties / nodes / items / properties / kind / enum
      Previous value: -[
      -  "trigger.command",
      -  "trigger.text",
      -  "trigger.callback",
      -  "trigger.media",
      -  "trigger.event",
      -  "trigger.fallback",
      -  "action.message",
      -  "action.ai",
      -  "action.condition",
      -  "action.switch",
      -  "action.edit",
      -  "action.delete",
      -  "action.set_variable",
      -  "action.marks",
      -  "action.delay",
      -  "action.request",
      -  "action.handoff",
      -  "action.notify",
      -  "action.jump",
      -  "action.menu",
      -  "action.wait",
      -  "action.validate",
      -  "action.media",
      -  "action.schedule",
      -  "action.subscription",
      -  "action.report",
      -  "action.attempts",
      -  "action.reset",
      -  "action.compute",
      -  "action.hours",
      -  "action.parse_date",
      -  "action.format_date",
      -  "action.schedule_at",
      -  "flow.split",
      -  "flow.merge"
      -]New value: +[
      +  "trigger.command",
      +  "trigger.text",
      +  "trigger.callback",
      +  "trigger.media",
      +  "trigger.event",
      +  "trigger.fallback",
      +  "action.message",
      +  "action.ai",
      +  "action.condition",
      +  "action.switch",
      +  "action.edit",
      +  "action.delete",
      +  "action.set_variable",
      +  "action.marks",
      +  "action.delay",
      +  "action.request",
      +  "action.handoff",
      +  "action.notify",
      +  "action.jump",
      +  "action.menu",
      +  "action.wait",
      +  "action.validate",
      +  "action.media",
      +  "action.schedule",
      +  "action.subscription",
      +  "action.report",
      +  "action.attempts",
      +  "action.reset",
      +  "action.compute",
      +  "action.keyboard",
      +  "action.form",
      +  "action.contact",
      +  "action.poll",
      +  "action.hours",
      +  "action.parse_date",
      +  "action.format_date",
      +  "action.schedule_at",
      +  "flow.split",
      +  "flow.merge",
      +  "flow.end"
      +]
    • removedInput schema / properties / provider
      Removed value: -{
      -  "description": "Подключение к ИИ для узлов «Ответ ИИ» из заготовки: название или идентификатор. Учитывается только при создании из заготовки.",
      -  "type": "string"
      -}
    • removedInput schema / properties / template
      Removed value: -{
      -  "description": "Заготовка стартового графа. Учитывается только при создании и без nodes.",
      -  "enum": [
      -    "blank",
      -    "ai_consultant",
      -    "faq_menu",
      -    "lead_form",
      -    "booking",
      -    "support_desk",
      -    "onboarding"
      -  ],
      -  "type": "string"
      -}
  5. Changed3 schema fields changedv0.1.14
    • changedInput schema / properties / edges / items / properties / out / description
      Previous value: -"Выход узла-источника, если их несколько: например «да» или «нет»."New value: +"Выход узла-источника, если их несколько. Названия латиницей и зависят от вида узла: у условия true и false, у запроса ok и error, у меню — номера кнопок. Полный перечень — в operbots_catalog what=node_kinds, поле «выходы». По умолчанию out."
    • addedInput schema / properties / knowledge_base
      Added value: +{
      +  "description": "База знаний для узлов «Ответ ИИ» из заготовки: название или идентификатор. Без неё консультант отвечает «из головы». Учитывается только при создании из заготовки.",
      +  "type": "string"
      +}
    • addedInput schema / properties / provider
      Added value: +{
      +  "description": "Подключение к ИИ для узлов «Ответ ИИ» из заготовки: название или идентификатор. Учитывается только при создании из заготовки.",
      +  "type": "string"
      +}
  6. Changed2 schema fields changedv0.1.13
    • changedInput schema / properties / nodes / items / properties / kind / enum
      Previous value: -[
      -  "trigger.command",
      -  "trigger.text",
      -  "trigger.callback",
      -  "trigger.event",
      -  "trigger.fallback",
      -  "action.message",
      -  "action.ai",
      -  "action.condition",
      -  "action.set_variable",
      -  "action.delay",
      -  "action.request",
      -  "action.handoff",
      -  "action.notify",
      -  "action.jump",
      -  "action.menu",
      -  "action.wait",
      -  "action.validate",
      -  "action.media",
      -  "action.schedule",
      -  "flow.split",
      -  "flow.merge"
      -]New value: +[
      +  "trigger.command",
      +  "trigger.text",
      +  "trigger.callback",
      +  "trigger.media",
      +  "trigger.event",
      +  "trigger.fallback",
      +  "action.message",
      +  "action.ai",
      +  "action.condition",
      +  "action.switch",
      +  "action.edit",
      +  "action.delete",
      +  "action.set_variable",
      +  "action.marks",
      +  "action.delay",
      +  "action.request",
      +  "action.handoff",
      +  "action.notify",
      +  "action.jump",
      +  "action.menu",
      +  "action.wait",
      +  "action.validate",
      +  "action.media",
      +  "action.schedule",
      +  "action.subscription",
      +  "action.report",
      +  "action.attempts",
      +  "action.reset",
      +  "action.compute",
      +  "action.hours",
      +  "action.parse_date",
      +  "action.format_date",
      +  "action.schedule_at",
      +  "flow.split",
      +  "flow.merge"
      +]
    • changedInput schema / properties / template / enum
      Previous value: -[
      -  "blank",
      -  "ai_consultant",
      -  "faq_menu",
      -  "lead_form",
      -  "support_desk",
      -  "onboarding"
      -]New value: +[
      +  "blank",
      +  "ai_consultant",
      +  "faq_menu",
      +  "lead_form",
      +  "booking",
      +  "support_desk",
      +  "onboarding"
      +]
  7. First observedv0.1.1

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial behavior beyond the annotations: the graph is replaced IN FULL, omitted nodes/edges/comments/viewport are preserved, a new revision is only created on real change, copies stay drafts, and auto-enable depends on the flow.publish right. This is far richer than the readOnly/openWorld/idempotent/destructive hints, though it never states auth requirements or rate limits explicitly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the create-vs-overwrite distinction, and nearly every sentence carries a distinct constraint (full-graph, preservation, market exclusion, publish rights). It is dense and could be chunked into clearer sub-points, but there is little filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-parameter mutation tool with nested objects and no output schema, the description covers both modes, the destructive full-replace semantics, side effects (draft vs published, rights), and the sibling alternatives. Nothing an agent needs to call it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema carries the field-level detail (baseline 3). The description nonetheless adds workflow semantics the schema cannot express: the full-replacement contract, the version requirement when editing an existing graph, and the conflict/merge protocol, which meaningfully raises it above baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verbs and resource (создать/сохранить сценарий) and cleanly splits the two modes: no flow = create (empty, from graph, or copy), flow = overwrite. It names the siblings it is not (market_install for ready-made scenarios, flows_publish for enabling), so an agent can route without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use rules: presence/absence of flow selects create vs overwrite, ready scenarios must come from market_install, and enabling goes through flows_publish. It also gives the operating procedure (read via flows_get, resend the full graph with version, re-read and merge on conflict), leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools