Skip to main content
Glama

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

flows_save

Create or overwrite a Telegram bot flow scenario by saving nodes, edges, and comments as a complete graph; copy an existing flow or update one via its identifier.

Instructions

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

Input Schema

TableJSON 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; без него будет «… — копия».
commentsNoКомментарии полотна целиком. [] удаляет все; без поля сохраняются.
templateNoУстаревшее поле создания: blank.
viewportNoПоложение полотна. Без поля сохраняется прежнее.
descriptionNoОписание.
provider_idNoУстаревшее поле создания: ID ИИ-сервиса. Текущая панель не использует его.
knowledge_base_idNoУстаревшее поле создания: ID базы знаний. Текущая панель не использует его.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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"
      +}
  3. 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"
      -}
  4. 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"
      +}
  5. 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"
      +]
  6. First observedv0.1.1

TDQS

A4.8/5.0
Behavior5/5

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

With annotations already covering readOnly, openWorld, idempotent, and destructive hints, the description adds critical behavioral context: the graph is replaced wholesale, omitted nodes/edges/comments/viewport are preserved, a new revision appears only if the graph actually changed, copies stay drafts, and first-script auto-enable depends on the flow.publish permission. No annotation contradiction is present.

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?

The description is dense but front-loads the create-versus-overwrite distinction and then adds operational rules. Most sentences carry unique information, though the passage is long enough that some tightening would improve scanability.

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 complex 15-parameter mutation tool with nested graph objects, no output schema, and annotations covering safety hints, the description supplies the missing operational context: create/overwrite semantics, whole-graph replacement, field preservation, revision behavior, permissions, and related tools.

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 already documents each parameter individually. The description nevertheless adds cross-parameter meaning: flow toggles create versus overwrite, copy_of controls copying, absent nodes/edges/comments/viewport are preserved, and names the graph-replacement rule. It stops short of explaining every parameter, but it meaningfully extends the schema.

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?

The description states a precise create-or-overwrite action for flow scripts and explicitly distinguishes the two modes via the presence or absence of the flow parameter. It names sibling tools (flows_get, market_install, flows_publish) and the copy_of alternative, so an agent can identify the tool's role without opening the 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?

It gives explicit when-to-use rules: omit flow to create (empty, from graph, or via copy_of), pass flow to overwrite, use flows_get before editing, use market_install for catalog scripts, and flows_publish to enable. Alternatives and exclusions are clearly stated.

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