Skip to main content
Glama

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

flows_save

Save a bot scenario as a new flow or overwrite an existing one by sending the entire node-and-edge graph. Changes require the full graph, and revisions are created only when it actually changes.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
botYesБот: название, @username или идентификатор.
caseNoДело: название или идентификатор. Если не указать, берётся дело по умолчанию, иначе последнее открытое в панели.
flowNoКакой сценарий перезаписать. Не указывайте для нового.
nameNoНазвание сценария.
edgesNoСвязи между узлами целиком.
nodesNoУзлы сценария целиком.
commentNoКомментарий к редакции.
copy_ofNoСкопировать существующий сценарий вместо создания пустого. Название копии — в name; без него будет «… — копия».
descriptionNoОписание.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

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

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only show readOnlyHint=false, openWorldHint=true, idempotentHint=false, destructiveHint=false. The description adds critical behavior: full-graph overwrite semantics, revision creation only on actual graph change, no activation on save, and exclusion of ready-made market templates. This goes well beyond annotation signals.

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?

The description is dense but every sentence earns its place: mode selection, overwrite behavior, full-graph requirement, revision condition, market exclusion, and publish alternative. It is front-loaded with the core create/overwrite distinction and avoids repetition of schema details.

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 9-parameter tool with no output schema, the description covers all essential operational aspects: how to create, how to overwrite, how to edit existing flows safely, what not to use it for, and what related tool to use for activation. Nothing critical is missing for correct invocation.

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 baseline is 3. The description adds meaningful semantic context beyond the schema: the graph must be sent whole, new revisions are created only if the graph changed, and the flow parameter controls create-vs-overwrite mode. This is genuinely useful parameter-level guidance.

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?

Description clearly states the tool creates a flow when `flow` is omitted and overwrites when supplied, with distinct creation modes (empty, from graph, copy_of). It is easily distinguished from sibling tools like flows_publish and flows_get, which are explicitly named.

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?

Explicitly explains when to use the tool, how to pass the graph whole, and points to alternatives: flows_get for reading before editing, market_install for ready-made flows, and flows_publish for activating a flow. No ambiguity about selection or workflow.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/uk-kd/operbots-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server