Skip to main content
Glama

Check, change and prepare a workflow

prepare_workflow
Read-onlyIdempotent

Use when you already have the step ids, in order, and the user wants to see, check or change a workflow (swap, add, remove or reorder steps); also before showing any plan. No steps yet: use plan_workflow to find them. Quick check: send slugs, the step ids in order (from get_item steps or plan_workflow), with an optional goal and user_inputs. Returns a diagram you can show the user, step_checks (is each required input made by an earlier step or given by the user, plus swap_options for each step), suggestions with reasons (insert a step that makes a missing input, reorder by data flow, swap a step, remove a repeat), the proposed steps with all but swaps applied, and open_in_builder, a link that opens the proposal in the site's builder. Also returns an unsaved portable draft, selected skill inventory, review hash and handoff_check. Send full steps with pinned revisions instead of slugs for custom notes and dependencies. Suggestions and warnings never block the draft; show them and apply only what the user approves. Does not compose with our AI, save, execute or certify approval; an approval hash never authorizes external actions.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "prepare_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
goalNoOptional. What the workflow is for.
nameNoOptional. Defaults to the goal.
notesNo
slugsNoStep ids in order, for a quick check or a change: each pinned to its current revision and run after the one before. Send slugs or steps, not both.
stepsNoFull step objects with pinned revisions, notes and dependencies. Send steps or slugs, not both.
user_inputsNoInput types the user will give (such as ad_copy; get_item lists a workflow's in handoff_check.user_inputs). The hand-off check treats them as supplied; they are not part of the draft hash.
custom_skillsNo
response_formatNoconcise (default): the Mermaid diagram and 2 swap options per step. detailed: also a text outline, the proposed workflow's diagram and 4 swap options per step.
governing_skillsNo
approved_draft_hashNoOptional host-reported hash of the exact previously reviewed draft. This field cannot establish consent or execution authorization.

Output Schema

NameRequiredDescriptionDefault
schemaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / user_inputs / description
      Previous value: -"Input types the user will give (such as ad_copy; get_workflow lists a workflow's in handoff_check.user_inputs). The hand-off check treats them as supplied; they are not part of the draft hash."New value: +"Input types the user will give (such as ad_copy; get_item lists a workflow's in handoff_check.user_inputs). The hand-off check treats them as supplied; they are not part of the draft hash."
  2. Changed12 schema fields changed
    • addedOutput schema / additionalProperties
      Added value: +true
    • removedOutput schema / properties / diagram
      Removed value: -{
      -  "description": "Show diagram.mermaid to the user in a ```mermaid code block; use outline (detailed) where diagrams do not render.",
      -  "properties": {
      -    "format": {
      -      "enum": [
      -        "mermaid"
      -      ],
      -      "type": "string"
      -    },
      -    "legend": {
      -      "type": "string"
      -    },
      -    "mermaid": {
      -      "type": "string"
      -    },
      -    "outline": {
      -      "type": "string"
      -    },
      -    "shows": {
      -      "type": "object"
      -    }
      -  },
      -  "required": [
      -    "format",
      -    "mermaid"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / draft_sha256
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / governing_added
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / handoff_check
      Removed value: -{
      -  "properties": {
      -    "handoffs": {
      -      "items": {
      -        "properties": {
      -          "from": {
      -            "type": "string"
      -          },
      -          "required": {
      -            "type": "boolean"
      -          },
      -          "step": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "step",
      -          "type",
      -          "from",
      -          "required"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "status": {
      -      "enum": [
      -        "PASS",
      -        "WARN"
      -      ],
      -      "type": "string"
      -    },
      -    "user_inputs": {
      -      "items": {
      -        "properties": {
      -          "step": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "step",
      -          "type"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "warnings": {
      -      "items": {
      -        "properties": {
      -          "add_one_of": {
      -            "items": {
      -              "type": "string"
      -            },
      -            "type": "array"
      -          },
      -          "made_by_later_step": {
      -            "type": "string"
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "problem": {
      -            "enum": [
      -              "missing",
      -              "out_of_order"
      -            ],
      -            "type": "string"
      -          },
      -          "step": {
      -            "type": "string"
      -          },
      -          "type": {
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "step",
      -          "type",
      -          "problem",
      -          "message"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "status",
      -    "handoffs",
      -    "user_inputs",
      -    "warnings"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / next_action
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / open_in_builder
      Removed value: -{
      -  "description": "Opens this workflow in the AI Blocks builder on useaiblocks.com, where the user can edit, save or download it.",
      -  "type": [
      -    "string",
      -    "null"
      -  ]
      -}
    • removedOutput schema / properties / proposed
      Removed value: -{
      -  "properties": {
      -    "changed": {
      -      "type": "boolean"
      -    },
      -    "diagram": {
      -      "description": "Show diagram.mermaid to the user in a ```mermaid code block; use outline (detailed) where diagrams do not render.",
      -      "properties": {
      -        "format": {
      -          "enum": [
      -            "mermaid"
      -          ],
      -          "type": "string"
      -        },
      -        "legend": {
      -          "type": "string"
      -        },
      -        "mermaid": {
      -          "type": "string"
      -        },
      -        "outline": {
      -          "type": "string"
      -        },
      -        "shows": {
      -          "type": "object"
      -        }
      -      },
      -      "required": [
      -        "format",
      -        "mermaid"
      -      ],
      -      "type": "object"
      -    },
      -    "handoff_status": {
      -      "enum": [
      -        "PASS",
      -        "WARN"
      -      ],
      -      "type": "string"
      -    },
      -    "remaining": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "slugs": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "steps": {
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "changed",
      -    "handoff_status",
      -    "slugs",
      -    "steps"
      -  ],
      -  "type": "object"
      -}
    • removedOutput schema / properties / state
      Removed value: -{
      -  "type": "string"
      -}
    • removedOutput schema / properties / step_checks
      Removed value: -{
      -  "items": {
      -    "properties": {
      -      "inputs": {
      -        "type": "array"
      -      },
      -      "slug": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "PASS",
      -          "WARN"
      -        ],
      -        "type": "string"
      -      },
      -      "step": {
      -        "type": "string"
      -      },
      -      "swap_options": {
      -        "type": "array"
      -      },
      -      "title": {
      -        "type": "string"
      -      },
      -      "url": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "step",
      -      "slug",
      -      "status",
      -      "inputs",
      -      "swap_options"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / suggestions
      Removed value: -{
      -  "items": {
      -    "properties": {
      -      "alternatives": {
      -        "type": "array"
      -      },
      -      "before_step": {
      -        "type": "string"
      -      },
      -      "fixes": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "for_steps": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "kind": {
      -        "enum": [
      -          "insert",
      -          "reorder",
      -          "remove",
      -          "swap"
      -        ],
      -        "type": "string"
      -      },
      -      "makes": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "moves": {
      -        "type": "array"
      -      },
      -      "order": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "replaces": {
      -        "type": "object"
      -      },
      -      "slug": {
      -        "type": "string"
      -      },
      -      "step": {
      -        "type": "string"
      -      },
      -      "title": {
      -        "type": "string"
      -      },
      -      "url": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "kind",
      -      "message"
      -    ],
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "schema",
      -  "draft_sha256",
      -  "state",
      -  "handoff_check",
      -  "next_action"
      -]New value: +[
      +  "schema"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds real behavior: suggestions and warnings never block the draft, apply only what the user approves, and an approval hash never authorizes external actions, plus it does not save or execute. That is meaningful beyond the structured hints, though it does not detail limits on size or revision drift.

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 when-to-use clause is front-loaded and almost every sentence carries information, but the middle is a dense run-on of return fields and parenthetical conditions that is harder to scan than it needs to be. No sentence is pure filler, though.

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 10-parameter read-only preparation tool with an output schema, the description covers inputs, the returned components (diagram, step_checks, suggestions, proposed steps, open_in_builder, draft, review hash, handoff_check) and the safety boundaries. An agent has what it needs to call and interpret it.

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 70%, and the description adds semantics beyond it: slugs are pinned to current revisions and run sequentially, full steps carry pinned revisions plus custom notes and dependencies, and user_inputs are treated as supplied while excluded from the draft hash. The custom_skills, governing_skills, response_format and approved_draft_hash parameters are left to the schema, keeping it short of a 5.

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?

States a specific verb and resource ('check, change and prepare a workflow') and enumerates the operations (swap, add, remove, reorder). It also distinguishes itself from the sibling plan_workflow for the 'no steps yet' case.

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 entry condition (you already have the step ids, in order), an explicit exclusion routing to plan_workflow when no steps exist, and a prerequisite source for the ids ('from get_item steps or plan_workflow'). It even prescribes usage timing ('before showing any plan').

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