Skip to main content
Glama

apply_operations

Apply a batch of operations to the flow at versionId, in order, then save — one call for everything you need built, not one per block/edge. Operations: add_block, configure_block, wire_edge, remove_edge, remove_block, set_condition_parts, add_router_case, remove_router_case, add_ai_router_decision, set_data_bucket_fields, add_agent_tool, configure_agent_tool, remove_agent_tool, add_placeholder, update_placeholder, remove_placeholder, set_flow_descriptions; each variant describes its fields. A LIVE version (list_flows' liveVersionId) cannot be edited: the whole batch is rejected. To change a live flow: stop_flow (pause_flow does not make it editable), apply_operations, then start_flow if it should run again. Atomic: if any operation fails, nothing is applied or saved; the error names the failed operation's index — fix it and resend the whole batch. localAlias: add_block (nodeId), add_router_case (caseId), add_ai_router_decision (decisionId) and add_agent_tool (the new toolId) accept a localAlias — any string (e.g. "trigger1"), unique across the batch. Any later operation in the same batch can pass it wherever that id is expected (nodeId, groupId, fromNodeId, toNodeId, branch, caseId, toolId); it is replaced by the generated id once the creating operation has run. It exists only within this call; for anything created before the batch use the real id. Result: { id, version, elementCount, status, errorMessage, results, issues, suggestions } — status/errorMessage: the server's verdict; results: one { index, operationName, operationResult } per operation, in order; issues: validation state of the final flow after all operations (as get_flow_summary shows), not per operation — they never block the save; fix them in a later batch. suggestions: optional improvements (descriptions for callers); they never affect running the flow.

Input Schema

NameRequiredDescriptionDefault
versionIdYes
operationsYes
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

No annotations are provided, so the description carries the entire burden and does: whole-batch rejection on live versions, atomicity (nothing applied or saved on failure), the error naming the failed operation's index and the resend-the-whole-batch recovery, localAlias lifetime and resolution timing, and the distinction between blocking errors and non-blocking issues/suggestions.

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 purpose and the live-flow workflow, then the localAlias rule, then the result shape — a sensible priority order for a dense tool. It is long and several sentences are packed with multiple clauses, but almost nothing is redundant given the no-annotation, no-output-schema situation.

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 17-variant batch mutation with no annotations and no output schema, the description covers preconditions, atomicity, id substitution, error recovery, and every top-level result field. An agent has enough to construct a correct batch and interpret the response without guessing.

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?

The top-level schema is bare (0% coverage on workspaceId/versionId/operations), but the description compensates heavily: versionId's live-version restriction, operations' ordering semantics, and the localAlias convention across add_block/add_router_case/add_ai_router_decision/add_agent_tool. It also describes the entire result shape ({ id, version, elementCount, status, errorMessage, results, issues, suggestions }) in the absence of an output schema. Only workspaceId and the 100-item cap go unmentioned.

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 first sentence names the verb, the resource (a batch of operations against the flow at versionId), the ordering guarantee, and the save behavior, then explicitly contrasts with the per-block/per-edge alternative. It enumerates all 17 operation variants so an agent knows the tool's full surface 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?

Gives an explicit when-to-use ("one call for everything you need built, not one per block/edge") and a full prerequisite workflow for live versions: stop_flow, then apply_operations, then start_flow, with the explicit exclusion that pause_flow does not make it editable. It also states a substitution rule — use localAlias only for batch-created ids, real ids for anything pre-existing.

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