Skip to main content
Glama

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

flows_save

Save a new bot scenario or overwrite an existing flow by submitting the full node-edge graph. Fetch the current flow before editing, then resubmit the complete updated graph to create a new revision.

Instructions

Без параметра flow создаёт сценарий — пустой, из переданного графа или копией другого (copy_of). С параметром flow перезаписывает его. Граф передаётся ЦЕЛИКОМ: чтобы поправить один узел, сначала прочитайте сценарий через flows_get и пришлите изменённый список полностью. Новая редакция создаётся, только если граф действительно изменился. Готовые сценарии — «Консультант с ИИ», «Заявка», «Запись на визит» и другие — здесь не создаются: их ставят из маркета через market_install. Сохранение не включает сценарий в работу — для этого есть 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; без него будет «… — копия».
descriptionNoОписание.

Schema Changelog

Changes observed during successful MCP inspections.

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

TDQS

A4.6/5.0
Behavior5/5

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

Описание добавляет важные поведенческие детали, которых нет в аннотациях: граф передаётся целиком, новая редакция создаётся только при реальном изменении графа, сохранение не публикует сценарий. Аннотациям не противоречит.

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

Conciseness5/5

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

Компактный абзац без повторов: ключевой сценарий вынесен в начало, каждая фраза сообщает новое существенное условие (полный граф, условие редакции, market, publish).

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

Completeness4/5

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

Описание закрывает главные вопросы выбора и побочных эффектов для сложного инструмента без output schema. Не хватает небольших деталей (например, поведения при отсутствии name для нового сценария), но они не критичны для корректного вызова.

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

Parameters3/5

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

Покрытие схемы 100%, поэтому базовый балл 3. Описание лишь частично связывает copy_of и flow с режимами работы; отдельные пояснения параметров уже есть в 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?

В первом же предложении разведены два режима: без flow — создание (пустого/из графа/копии), с flow — перезапись. Это чётко отличает инструмент от flows_get, flows_publish и market_install.

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?

Прямо названы альтернативы и условия: для готовых сценариев — market_install, для включения в работу — flows_publish, для точечной правки — сначала flows_get, затем полный граф в flows_save. Такое руководство не оставляет выбора альтернативы на догадку.

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