Skip to main content
Glama

Edit workflow graph

edit_graph
Destructive

Apply ONE granular edit to a workflow agent's graph (agent must be pattern_type=workflow). The extra fields you pass depend on op: add_node -> node {name,type,config?,position?}; update_node -> name, config_patch?, position?, new_name?; remove_node -> name; add_edge -> from_node, to_node, kind? ('flow' default, 'state' for state access), condition?, label?; remove_edge -> from_node, to_node; set_state_field -> field, field_type? (default 'str'), default?, reducer?. Node types in use: state, condition, router, agent, set_state. start/end are valid edge endpoints.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesWhich graph operation to apply.
agent_idYesTarget agent's id (from list_agents / create_agent / get_catalog view=agents).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / agent_id / description
      Added value: +"Target agent's id (from list_agents / create_agent / get_catalog view=agents)."
    • addedInput schema / properties / op / description
      Added value: +"Which graph operation to apply."
    • addedInput schema / properties / op / enum
      Added value: +[
      +  "add_node",
      +  "update_node",
      +  "remove_node",
      +  "add_edge",
      +  "remove_edge",
      +  "set_state_field"
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior3/5

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

The description lists operations like remove_node and remove_edge which obviously have destructive behavior, and annotations already carry destructiveHint=true. It adds useful preconditions (agent must be workflow) and explains parameter defaults (e.g., edge kind defaults to 'flow'), but it does not disclose whether edits are reversible, whether validation happens prior to commit, or whether the change is local/global. The bar is lower because annotations already declare destructive intent, but the behavior is only partially transparent.

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?

The description is condensed and effective; the core purpose and precondition appear first, then the op-perop field mappings. It is denser than one might like due to the semicolon-separated list, but it avoids repetition and every segment conveys the required mapping. It could be better formatted with line breaks, yet is still an appropriately sized spec.

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 tool with six dynamic ops, the description covers all relevant context: the significant constraints (workflow agent, valid endpoints, node types), the complete op→fields matrix, and default values. There is no output schema, and the description does not pretend to specify return formats, but nothing an agent needs to know in order to call the correct op and pass correct parameters is omitted.

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

Parameters5/5

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

While the input schema only formally defines op and agent_id, the description exhaustively explains the additionalParameters structure for every op: add_node, update_node, remove_node, add_edge, remove_edge, set_state_field, including optional fields and defaults (e.g., kind? default 'flow', field_type? default 'str'). This meaningfully compensates for the schema's additionalProperties:true being a black box, and gives an agent the exact data shapes required for each case.

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 opens with a specific, action-oriented statement: 'Apply ONE granular edit to a workflow agent's graph.' It names the resource ('a workflow agent's graph'), the key precondition (pattern_type=workflow), and distinguishes this from sibling tools like update_agent or build_agent by defining the granular op vocabulary. This leaves no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is clearly provided: the tool is for making a single granular edit against a graph, and requires the agent to be pattern_type=workflow. However, it does not explicitly name alternatives such as 'use update_agent instead for broader edits' or give a when-not-to-use statement. The intent is conveyed but not fully routed against siblings.

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