Common Workflows
Step-by-step MCP tool sequences for common tasks.
Create a New Flow with Blocks
Update a Prompt and Republish
Add a Loop Over Items
Add Structured Output with Object Models
Reorganize Flow Structure
Test a Flow
Debug a Failed Test
Attach an Eval to a Flow
An eval is authored once in the project library, then attached wherever it should run. The two steps use different endpoints — definitions are project-scoped, bindings are flow-scoped.
judge_prompt and judge_model are required for every judge_type, including code. Use scope="block" with step_id to judge one step, or scope="test-case" with test_case_id — that is the only scope that accepts expected.
Retune an Eval
Both update tools require a content_version, and the two tokens are independent — a definition's version is not its binding's version. Read the current values from list_evals.
The server currently checks only that content_version is present, not that it matches. A stale value is accepted and the write goes through, so this does not yet protect you from a concurrent editor overwriting your change. Checkpoint first (step 2 below) if that matters.
Switching a binding to mode="gate" makes a failing eval abort the run with EVAL_GATE_FAILED instead of merely recording the verdict.
Key Patterns
- Always start with
hydrate_project— understand state before making changes - Use sibling-relative mode for
add_blockwhen possible (target_id+direction) - Publish after changes — unpublished changes don't affect the API
- Set production version to make a published version live
- Checkpoint before major prompt changes —
create_block_checkpointfor prompts,create_eval_checkpointfor judge bodies - Use
run_all_testsafter prompt changes — verify no regressions across all test cases - Use
get_test_run_traceto debug failures — see exact inputs/outputs per block