Skip to main content
Glama

AI Blocks

Check, change and prepare a workflow

prepare_workflow
Read-onlyIdempotent

Check a workflow, or a change to one. Call it whenever the user wants to see, check or change a workflow (swap, add, remove or reorder steps), and before showing any plan. Quick check: send slugs, the step ids in order (from get_workflow 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.

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_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.
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
stateYes
schemaYes
diagramNoShow diagram.mermaid to the user in a ```mermaid code block; use outline (detailed) where diagrams do not render.
proposedNo
next_actionYes
step_checksNo
suggestionsNo
draft_sha256Yes
handoff_checkYes
governing_addedNo
open_in_builderNoOpens this workflow in the AI Blocks builder on useaiblocks.com, where the user can edit, save or download it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description still adds substantial behavioral context: the returned artifacts (diagram, step_checks, swap_options, suggestions with reasons, proposed steps, open_in_builder, unsaved portable draft, review hash, handoff_check). It also discloses non-obvious semantics — suggestions never block the draft, only user-approved changes are applied, and an approval hash never authorizes external actions.

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?

Purpose and trigger are front-loaded, and the sentence-per-topic structure is logical (when to call, quick check, returns, escalation path, limits). It is dense and occasionally overloaded — the "Quick check:" and "Returns ..." sentences pack many clauses — but given ten parameters and a rich return payload, little is truly wasted.

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?

For a ten-parameter, output-schema-bearing tool, the description covers the dominant calling patterns, the meaning of the results, and the safety boundaries. The main omission is any guidance on custom_skills/governing_skills and how skill inventory affects the draft, which an agent would have to infer from the schema alone.

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?

With 70% schema coverage the schema does much of the work, but the description adds real meaning: slugs are pinned to current revisions and run in order, full steps should be sent for custom notes and dependencies, and user_inputs are treated as supplied and excluded from the draft hash. It does not explain custom_skills or governing_skills, which are the schema's most complex inputs, so it is strong but incomplete.

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?

Opens with a specific verb+resource ("Check a workflow, or a change to one") and immediately enumerates the change types it validates (swap, add, remove, reorder). It also distinguishes itself from siblings by naming get_workflow steps and plan_workflow as the sources of step ids, so an agent can place it in the flow without opening other schemas.

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?

Gives an explicit trigger ("whenever the user wants to see, check or change a workflow") plus a timing constraint ("before showing any plan") and clear exclusions ("does not compose with our AI, save, execute or certify approval"). It stops short of full routing guidance — e.g. it never says whether plan_workflow should precede it when no workflow exists yet — so the alternative-selection story is clear but not complete.

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