Skip to main content
Glama

Workflow Graph Tool

workflow_graph
Destructive

Edit workflow DAGs by adding, updating, or deleting nodes and edges. Each change re-validates the graph to prevent cycles and orphan nodes.

Instructions

Surgical edits to a workflow's DAG (nodes + edges). For metadata changes (name, description, status, validation, AI generation) use workflow_manage. Every edit re-validates the graph; an edit that would create a cycle, an unreachable node, or an invalid edge type is rejected before commit.

Actions:

  • save_graph (write — full replace) — workflow_id, nodes[], edges[]. Atomically replaces the entire graph; existing in-flight runs continue on the old graph.

  • node_add (write) — workflow_id, type (start|end|agent|conditional|human_task|switch|dynamic_fork|do_while), config (type-specific).

  • node_update (write) — workflow_id, node_id, config (partial).

  • node_delete (DESTRUCTIVE) — workflow_id, node_id. Cascade-deletes incident edges; rejected if it would orphan nodes.

  • edge_add (write) — workflow_id, source_id, target_id; optional condition / case_value for switch nodes.

  • edge_delete (DESTRUCTIVE) — workflow_id, edge_id. Rejected if it would disconnect the graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to perform: save_graph, node_update, node_add, node_delete, edge_add, edge_delete
deadline_msNoOptional: max wall-clock time (ms) the tool may spend. If exceeded during the call, returns a DEADLINE_EXCEEDED error. Minimum 100 ms. Leave unset for no deadline.
workflow_idYesThe workflow UUID
nodesYesArray of node objects. Each must have: type (start|end|agent|conditional|human_task|switch|dynamic_fork|do_while), label (string), and optionally agent_id, skill_id, config.
edgesNoArray of edge objects. Each must have: source_node_index (int), target_node_index (int), and optionally condition, label, is_default.
node_idYesThe workflow node UUID
labelNoNew label for this node
agent_idNoUUID of the agent to assign to this node. Pass empty string to detach.
skill_idNoUUID of the skill to assign to this node. Pass empty string to detach.
crew_idNoUUID of the crew to assign to this node. Pass empty string to detach.
configNoNode configuration object (e.g. timeout, retries, prompt_override)
expressionNoCondition expression for conditional/switch nodes (e.g. "output.score > 0.8")
position_xNoHorizontal position on the canvas
position_yNoVertical position on the canvas
typeYesNode type (see tool description for full list and config details)
source_node_idYesUUID of the source node (where the edge originates)
target_node_idYesUUID of the target node (where the edge points to)
conditionNoCondition object for conditional edges (e.g. {"field": "score", "op": "gt", "value": 0.8})
case_valueNoCase value for switch node routing — this edge is taken when the expression equals this value
is_defaultNoMark this as the default edge when no other condition matches. Default: false
source_channelNoOutput port of the source node, e.g. "on_success", "on_error", "on_timeout"
target_channelNoInput slot of the target node (for multi-input nodes)
edge_idYesThe workflow edge UUID to delete
Behavior4/5

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

Annotations already set destructiveHint: true. Description adds important behavioral details: atomic replacement for save_graph with old graph retained for in-flight runs, cascade deletion for node_delete, and rejection conditions. No contradiction with annotations. Could include more on authorization or rate limits, but sufficient.

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?

Well-structured with clear introduction and bullet-point actions. Front-loaded with purpose and sibling pointer. Each sentence adds value, though slightly verbose. Could be trimmed but effective.

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?

Given 23 parameters, 6 actions, and no output schema, the description covers all actions with behavioral notes, rejection rules, and parameter roles. Missing return value description is a minor gap, but overall complete for complex tool.

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% (baseline 3). Description adds concrete meaning beyond schema property descriptions: e.g., for node_delete explains cascade deletion and orphan rejection; for edge_add mentions optional condition/case_value. This extra context justifies +1.

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 clearly states tool purpose ('Surgical edits to a workflow's DAG (nodes + edges)') and explicitly distinguishes it from sibling 'workflow_manage' for metadata changes. The verb 'edits' combined with specific action list makes purpose unambiguous.

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?

Provides explicit when-to-use (DAG edits) and when-not-to-use ('For metadata changes... use workflow_manage'). Also warns that edits are rejected if they would create cycles, unreachable nodes, or invalid edge types, giving clear usage constraints.

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

Install Server

Other Tools

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/escapeboy/agent-fleet-o'

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