Skip to main content
Glama

Update a chat flow

update_flow
DestructiveIdempotent

Change a chat flow; only the fields you send change, but a graph or a triggerConfig you send replaces the stored one whole (get_flow first). It does not turn the flow on or off — set_flow_active does. If the flow is already active, the edit is live for the next contact at once, in the account's name, so say so before editing a live flow. Writing also needs chat enabled for the organization and an ADMIN or OWNER role in it, and a new flow counts against the plan's flow limit (403 CHAT_FLOW_LIMIT_REACHED) — the same refusals a person gets in the app. Needs the organization's "Let AI assistants create and edit chat flows" setting (mcpFlowsEnabled; only the organization's OWNER can switch it on, in Settings → Organization → General → AI Assistants; without it the api answers 403 MCP_FLOWS_DISABLED) and a connection authorized with the flows permissions — one authorized before they existed must remove PostRite from the assistant and add it again.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "flowId": "<flowId>"
    },
    "name": "update_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoThe flow's name, shown in the app (1 to 200 characters)
graphNoThe flow's graph: { entryNodeId, nodes (1 to 100 nodes), edges }, validated by the same schema the app's flow builder saves with. Every node has a unique `id` (letters, digits, - and _) and a `type`; `position` {x, y} is optional (the builder lays out a graph that has none). Node types and their fields (? = optional): SEND_MESSAGE {text (≤1000), attachments?: [{type: image|video|audio|file, url (≤2048), name? (≤255), mimeType? (≤120), size?, mediaId?, external?}], links?: [{id (≤40), label (≤20), url (≤2000)}]}; WAIT {seconds (integer ≤82800)}; WAIT_FOR_REPLY {quickReplies?: [{id (≤40), label (≤20)}], timeoutSeconds? (integer ≤604800)}; CONDITION {kind: HAS_TAG|ATTRIBUTE_EQUALS|CHANNEL_IS|WITHIN_BUSINESS_HOURS, key? (≤80), value? (≤200)}; ADD_TAG|REMOVE_TAG {tag (≤60)}; SET_ATTRIBUTE {key (≤80), value (≤500)}; REPLY_TO_COMMENT {texts[]}; ASK_INPUT {inputKind: email|phone|text, attributeKey (≤80), timeoutSeconds? (integer ≤604800)}; HANDOFF {note? (≤280)}; END. An edge is { from, to, fromHandle? }; `fromHandle` picks the branch: "next" (or omitted) on most nodes, "true"/"false" out of a CONDITION (it needs both), a quick reply's id or "timeout" out of WAIT_FOR_REPLY, "invalid" or "timeout" out of ASK_INPUT. A question is the SEND_MESSAGE that leads into a WAIT_FOR_REPLY: the reply buttons (quickReplies) are offered with that message, and each button becomes a branch. A circular menu is allowed; a run stops after 50 steps. On update_flow, a graph replaces the whole stored graph — send every node and edge, not a patch.
flowIdYesThe flow's ID (from list_flows)
triggerTypeNoReplaces what starts the flow (the same values as create_flow). Omit it to leave the trigger unchanged. It does not turn the flow on or off — a flow that is already active stays active with the new trigger.
connectionIdsNoReplaces the accounts this flow answers on (platform connection IDs, from list_platform_connections). Omit it to leave them unchanged — do NOT send [] to mean 'no change': an empty list means EVERY messaging account in the organization, which on a live flow starts answering on all of them at once.
triggerConfigNoWhat starts the flow, read per triggerType. Fields (? = optional): matchMode?: CONTAINS|EXACT|STARTS_WITH|ANY, keywords?[], platformPostIds?[], postId?, ref? (≤120). matchMode and keywords narrow a MESSAGE_RECEIVED trigger (no keywords = every message); platformPostIds narrows COMMENT_RECEIVED to those posts (absent = every post on the account, organic ones included); ref is the REFERRAL value of the ig.me / m.me link. On update_flow: omit it to keep the stored config; what you send REPLACES it whole, so repeat every keyword and post id you want to keep. A config that narrows nothing (no keywords, platformPostIds, postId or ref) is refused on update, because it would make a live flow answer every message or every post; widening a trigger is done in the app.
organizationIdNoOrganization to act in — an id from list_organizations. Required when this connection was authorized for more than one organization; omit it when there is only one.
cooldownMinutesNoMinutes before the same contact can start this flow again. Omit it to keep the stored value.
maxRunsPerContactPerDayNoHow many times one contact can start this flow in a day. Omit it to keep the stored value.

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
graphNo
runCountNo
createdAtNo
isEnabledNotrue = live: it answers real contacts
updatedAtNo
triggerTypeNo
connectionIdsNoThe accounts it answers on; empty = every messaging account
isGraphBrokenNoThe stored graph no longer parses; rewrite it with update_flow
triggerConfigNo
cooldownMinutesNo
lastTriggeredAtNo
runCountLast7DaysNo
maxRunsPerContactPerDayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond destructiveHint/idempotentHint, the description discloses the exact mutation model: omitted fields are preserved, but a graph or triggerConfig you send replaces the stored value whole. It adds error-level behavior (403 CHAT_FLOW_LIMIT_REACHED, 403 MCP_FLOWS_DISABLED), the live-flow side effect, and the fact that writes are attributed in the account's name — context an agent cannot get from annotations.

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 most decision-relevant facts (partial update, whole-replace, activation is elsewhere) before the prerequisite and error details. It is dense and heavy with parentheticals, and the flow-limit clause is really about create_flow rather than updates, but almost every sentence carries actionable information.

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 9-parameter mutation tool with nested graph objects, it covers the mutation semantics, activation separation, permission/setting prerequisites, error codes, and the live-flow hazard. With an output schema present and 100% schema coverage, nothing material an agent needs before calling 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 already 100% and the nested graph/triggerConfig schemas are thoroughly self-documenting, so the baseline is 3. The description still adds a cross-parameter rule the schema states only per-field: the partial-update contract for scalars versus whole-replacement for graph and triggerConfig, which changes how an agent must build a call.

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?

"Change a chat flow" names a specific verb and resource, then immediately scopes it against siblings: it does not activate/deactivate (that is set_flow_active) and it expects get_flow first. An agent can differentiate this from create_flow, get_flow, and set_flow_active 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 preconditions for use are spelled out: call get_flow first, use set_flow_active rather than this tool for activation, and warn before editing a live flow because the change takes effect on the next contact. It also states the required role (ADMIN/OWNER), the org setting (mcpFlowsEnabled, OWNER-only), and connection authorization, plus the remediation for an old connection (remove and re-add PostRite).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources