NOUKAI

Tool Listing

All 61 Noukai MCP tools organized by category with parameter schemas.

Noukai exposes 61 MCP tools for programmatic flow management.

Read Tools

Inspect flows, blocks, and operation history.

list_flows

List all flows in a project with summary info: ID, name, slug, block count, and whether steps exist. Does not include block details — use get_flow or hydrate_project for that.

ParameterTypeRequiredDescription
project_idstringYesProject UUID

get_flow

Get full flow detail: metadata, annotated steps tree (with block names and processor types inline), and all block details including prompts, schemas, and configs.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID

get_flow_structure

Get just the annotated steps tree for a flow — lightweight. Returns the tree with block names and processor types inline, plus block count. Use this when you only need topology, not full block details.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID

get_block

Get a single block's full detail: prompt, model, schemas, config, processor config, and notes. For code blocks, also returns a runtime_context field with the generated wrapper signature, sandbox rules, and parameter bindings. Use when you need to inspect or modify one specific block.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block

get_operation_history

Get recent operation history for a flow from the oplog. Returns operation type, sequence number, timestamp, request payload, and result. Useful for understanding what changes were made recently.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
limitintegerNoMax entries to return (1-100, default 20)
offsetintegerNoNumber of entries to skip (default 0)

hydrate_project

Fetch complete project data: all flows with their blocks (including prompts, schemas, configs), checkpoints, versions, object models, and test cases. Call this first to understand a project's current state.

ParameterTypeRequiredDescription
project_idstringYesProject UUID

Structural Tools

Add, remove, move, and organize blocks in the flow tree.

add_block

Add a new processing block to a flow. Two modes: (1) Sibling-relative — use target_id + direction to insert relative to an existing block (preferred). (2) Parent-absolute — use parent_id + position for exact placement. If the flow is empty, omit both to create the first block. For processor_type='code': the prompt field is the function BODY only (Python). The runtime wraps it in def _block(initial, ...input_schema_fields):. No imports, no function definition. Must return a dict. See https://docs.noukai.dev/docs/mcp-reference/block-runtime-contract.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
namestringYesBlock display name
processor_typestringYesOne of: llm, passthrough, code
target_idstringNoStep ID of an existing block to insert relative to (sibling-relative mode)
directionleft, right, top, bottomNoWhere to place the new block relative to target_id
parent_idstringNoParent container/loop ID (parent-absolute mode). Null for root (empty tree only)
positionintegerNo0-indexed position within parent's children (parent-absolute mode)
modelstringNoModel identifier (e.g. anthropic/claude-sonnet-4-6). Optional for processor_type='llm' — defaults to google/gemini-3.1-flash-lite-preview when omitted. Ignored for non-llm processor types.
promptstringNoInitial prompt text

remove_block

Remove a block from a flow. If the block's parent container has only one child after removal, the container is automatically unwrapped.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block to remove

move_block

Move a block (or container) to a new position in the flow tree.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the node to move
new_parent_idstringYesTarget parent container/loop ID
new_positionintegerYesPosition in new parent's children (0-indexed, post-removal)

duplicate_block

Copy a block to a new position with new IDs. Defaults to immediately after the original.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block to duplicate
target_parent_idstringNoTarget parent (defaults to same parent)
target_positionintegerNoPosition (defaults to after original)

wrap_in_container

Wrap one or more adjacent sibling nodes in a new container.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
node_idsarrayYesIDs of adjacent sibling nodes to wrap
container_typestringYesh (sequential) or v (parallel)

unwrap_container

Remove a container and promote its children to the container's parent.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
container_idstringYesID of the container to unwrap

wrap_in_loop

Wrap one or more adjacent sibling nodes in a loop that iterates over an array field.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
node_idsarrayYesIDs of adjacent sibling nodes to wrap
array_fieldstringYesName of the array field to iterate over
loop_idstringNoOptional client-generated loop ID (server generates one if omitted)

unwrap_loop

Remove a loop and promote its children to the loop's parent.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
loop_idstringYesID of the loop to unwrap

reorder_children

Reorder the children of a container or loop. The new order must contain exactly the same child IDs.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
parent_idstringYesContainer or loop ID
child_orderarrayYesNew order of child IDs

rename_block

Rename a block's display name.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
namestringYesNew name

change_processor_type

Change a block's processor type (llm, passthrough, or code).

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
processor_typestringYesllm, passthrough, or code

Lifecycle Tools

Create and delete flows.

create_flow

Create a new empty flow in a project. This is the first step when building a new pipeline.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
namestringYesFlow display name
slugstringYesURL-safe identifier (lowercase, hyphens)
descriptionstringNoFlow description

delete_flow

Delete a flow and all its blocks, checkpoints, and versions (soft-delete). This is destructive.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID

Content Tools

Update block prompts, schemas, configs, and flow metadata.

update_block_draft

Update a block's prompt text (full replacement, not a diff). For code blocks: content is the function BODY only (Python) — the runtime wraps it in def _block(initial, ...):. No imports, no function def, must return a dict. See https://docs.noukai.dev/docs/mcp-reference/block-runtime-contract. Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics. For multi-field edits, prefer update_block (one round-trip, one version bump).

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
contentstringYesThe new prompt text (full replacement)
base_versionintegerNoContent version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_block_config

Update a block's model and configuration. At least one of model, config, or processor_config must be provided — omitted fields remain unchanged. Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics. For multi-field edits that also touch draft / notes / schemas, prefer update_block (one round-trip, one version bump).

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
modelstringNoModel identifier (e.g. 'anthropic/claude-sonnet-4-6')
configobjectNoBlock config (maxTokens, temperature, etc.)
processor_configobjectNoProcessor-specific config
base_versionintegerNoContent version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_block_input_schema

Replace a block's input schema (full replacement). For code blocks: field names become the function parameters (after initial). Changing this changes the wrapper signature. Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics. For multi-field edits, prefer update_block.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
contentobjectYesThe new input schema (full replacement)
base_versionintegerNoContent version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_block_output_schema

Replace a block's output schema (full replacement). For code blocks: field names define the expected return dict keys. Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics. For multi-field edits, prefer update_block.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
contentobjectYesThe new output schema (full replacement)
base_versionintegerNoContent version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_block_notes

Replace a block's notes text (full replacement). Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics. For multi-field edits, prefer update_block.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
contentstringYesThe new notes text (full replacement)
base_versionintegerNoContent version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_flow_meta

Update a flow's metadata. At least one of name, description, flow_settings, or notes must be provided — omitted fields remain unchanged. Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
namestringNoNew flow name
descriptionstringNoNew flow description
flow_settingsobjectNoNew flow settings
notesstringNoNew flow notes
base_versionintegerNoMeta version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_flow_global_input

Replace a flow's global input schema (full replacement). Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
contentobjectYesThe new global input schema (full replacement)
base_versionintegerNoMeta version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

update_flow_trigger

Replace a flow's trigger configuration (full replacement). Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
contentobjectYesThe new trigger configuration (full replacement)
base_versionintegerNoMeta version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

Block Checkpoint Tools

Save and manage block-level prompt snapshots. Distinct from eval checkpoints, which snapshot a judge body — see Eval Tools.

create_block_checkpoint

Save the current BLOCK PROMPT as a named checkpoint (snapshot). Useful for tracking prompt iterations. Not to be confused with create_eval_checkpoint, which snapshots an eval's judge body.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
notestringNoOptional note describing this checkpoint

delete_block_checkpoint

Delete a block-prompt checkpoint from a block. Not to be confused with delete_eval_checkpoint.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
checkpoint_idstringYesCheckpoint UUID

Eval Tools

Author reusable judges (the project eval library), attach them to flows/blocks/test cases as bindings, and snapshot judge bodies as eval checkpoints. Library and eval-checkpoint tools are project-scoped; binding tools are flow-scoped.

list_evals

List a project's eval definitions (the reusable judge library), their bindings (where each judge is attached), and their checkpoints. Read content_version from here before calling update_eval or update_eval_binding. Optional flow_id filters BINDINGS only — definitions and checkpoints are project-level and always returned in full. Backed by project hydration, so this is a relatively heavy call.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
flow_idstringNoOptional — restrict returned bindings to this flow

create_eval

Create a reusable eval DEFINITION (a judge) in the project library. This does NOT attach it to anything — call attach_eval afterwards to bind it to a flow, block, or test case. judge_prompt and judge_model are required non-empty for every judge_type, including 'code'.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
eval_idstringNoOptional client-minted UUID; the server mints one when omitted
namestringNoHuman-readable eval name
descriptionstringNoWhat this eval checks
judge_promptstringYesThe rubric the judge applies. Required non-empty for ALL judge types, including 'code'.
judge_modelstringYesModel the judge runs on. Required non-empty for ALL judge types, including 'code'.
judge_providerOPENROUTER, AZURE_OPENAI, GOOGLE_VERTEXNoBYOK provider wire-token for the judge model. Omit for OpenRouter (the default). Uppercase — a lowercase or vendor-style value ('openai', 'anthropic') is a 400.
judge_typellm, code, schemaNoJudge implementation. Default 'llm'.
codestringNoJudge body for judge_type='code'.
pass_criteriaobjectNoHow a verdict is scored. One of three shapes: {type:'boolean', threshold: 0..1, optimizationDirection:'maximize'|'minimize'}; {type:'score', choices:[{label, score: 0..1}] (unique labels), optimizationDirection:'maximize'|'minimize'|'none', allowSkip?: bool}; {type:'classification', classifications:[unique non-empty strings], allowNoMatch?: bool}. Omitted or untyped input coerces to the boolean default.

update_eval

Update an eval DEFINITION in the project library. At least one definition field must be supplied. Binding-only fields (severity, activation, sort_order, expected) are a category error here — use update_eval_binding for those.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
eval_idstringYesEval definition UUID
content_versionintegerYesREQUIRED concurrency token. Unlike the block/flow content tools, eval updates do NOT auto-detect it — the only eval read path is full project hydration, too expensive to spend on one integer. Read the current value from list_evals. Note the library eval's contentVersion and a binding's contentVersion are INDEPENDENT tokens — never swap them. CAVEAT: the server currently checks only that this field is PRESENT, not that it matches — a stale value is accepted and the write goes through, so this does not yet protect against a concurrent editor clobbering your change.
namestringNoHuman-readable eval name
descriptionstringNoWhat this eval checks
judge_promptstringNoThe rubric the judge applies. Required non-empty for ALL judge types, including 'code'.
judge_modelstringNoModel the judge runs on. Required non-empty for ALL judge types, including 'code'.
judge_providerOPENROUTER, AZURE_OPENAI, GOOGLE_VERTEXNoBYOK provider wire-token for the judge model. Omit for OpenRouter (the default). Uppercase — a lowercase or vendor-style value ('openai', 'anthropic') is a 400.
judge_typellm, code, schemaNoJudge implementation. Default 'llm'.
codestringNoJudge body for judge_type='code'.
pass_criteriaobjectNoHow a verdict is scored. One of three shapes: {type:'boolean', threshold: 0..1, optimizationDirection:'maximize'|'minimize'}; {type:'score', choices:[{label, score: 0..1}] (unique labels), optimizationDirection:'maximize'|'minimize'|'none', allowSkip?: bool}; {type:'classification', classifications:[unique non-empty strings], allowNoMatch?: bool}. Omitted or untyped input coerces to the boolean default.

delete_eval

Soft-delete an eval DEFINITION from the project library. Fails while the eval still has live bindings — call detach_eval on each binding first.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
eval_idstringYesEval definition UUID

attach_eval

Attach a library eval to a flow, creating a binding. scope='pipeline' judges the whole flow output, 'block' judges one step (requires step_id), 'test-case' judges a saved test case (requires test_case_id, and is the only scope that accepts expected).

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
eval_idstringYesUUID of the library eval to attach
scopepipeline, block, test-caseYesWhere the judge runs
binding_idstringNoOptional client-minted UUID; the server mints one when omitted
step_idstringNoRequired when scope='block'
test_case_idstringNoRequired when scope='test-case'
activationobjectNoPer-binding activation rules
severityerror, warningNoFailure severity. Default 'error'.
expectedanyNoExpected verdict. Accepted ONLY when scope='test-case' on attach_eval — any other scope is a 400. Pass null to clear it on update.
sort_orderintegerNoOrdering within the scope
modeobserve, gate, healNoExecution mode. Default 'observe' (record only). 'gate' fails the run with EVAL_GATE_FAILED; 'heal' retries. gate_params are consulted only for gate/heal, and are validated against the bound eval's pass_criteria at attach time.
heal_paramsobject, nullNoHeal policy (mode='heal'). Null clears.
gate_paramsobject, nullNoGate policy (mode='gate'|'heal'). {on_skip:'gate'|'pass'} plus, for score criteria, gate_threshold in 0..1. Null clears.

update_eval_binding

Retune a binding's per-attachment overrides (severity, activation, mode, gate/heal params, expected, ordering). At least one must be supplied. Definition fields (judge_prompt, judge_model, ...) belong to update_eval, not here.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID the binding belongs to
binding_idstringYesBinding UUID (NOT the library eval_id)
content_versionintegerYesREQUIRED concurrency token. Unlike the block/flow content tools, eval updates do NOT auto-detect it — the only eval read path is full project hydration, too expensive to spend on one integer. Read the current value from list_evals. Note the library eval's contentVersion and a binding's contentVersion are INDEPENDENT tokens — never swap them. CAVEAT: the server currently checks only that this field is PRESENT, not that it matches — a stale value is accepted and the write goes through, so this does not yet protect against a concurrent editor clobbering your change.
activationobjectNoPer-binding activation rules
severityerror, warningNoFailure severity. Default 'error'.
expectedanyNoExpected verdict. Accepted ONLY when scope='test-case' on attach_eval — any other scope is a 400. Pass null to clear it on update.
sort_orderintegerNoOrdering within the scope
modeobserve, gate, healNoExecution mode. Default 'observe' (record only). 'gate' fails the run with EVAL_GATE_FAILED; 'heal' retries. gate_params are consulted only for gate/heal, and are validated against the bound eval's pass_criteria at attach time.
heal_paramsobject, nullNoHeal policy (mode='heal'). Null clears.
gate_paramsobject, nullNoGate policy (mode='gate'|'heal'). {on_skip:'gate'|'pass'} plus, for score criteria, gate_threshold in 0..1. Null clears.

detach_eval

Detach a binding, removing the judge from that flow location. The library eval DEFINITION is untouched and stays reusable.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID the binding belongs to
binding_idstringYesBinding UUID (NOT the library eval_id)

create_eval_checkpoint

Snapshot a library eval's judge body (type, prompt, code, model, provider, pass criteria) as an immutable checkpoint. This is the EVAL analogue of create_block_checkpoint — that one snapshots a block prompt and is flow-scoped; this one snapshots a judge and is project-scoped.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
eval_idstringYesEval definition UUID
notestringNoOptional note describing this checkpoint

delete_eval_checkpoint

Soft-delete an eval checkpoint. Not to be confused with delete_block_checkpoint.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
eval_idstringYesEval definition UUID the checkpoint belongs to
checkpoint_idstringYesEval checkpoint UUID

set_active_eval_checkpoint

Pin a library eval to one of its checkpoints, so the judge runs from the frozen snapshot instead of the live definition. Pass checkpoint_id=null (or omit it) to deactivate and fall back to the live definition.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
eval_idstringYesEval definition UUID
checkpoint_idstring, nullNoEval checkpoint UUID to activate, or null to deactivate

Versioning Tools

Publish immutable versions and set production.

publish_version

Publish the current flow state as an immutable version. Freezes the tree structure and all block states.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
notestringNoVersion note

set_production_version

Set which published version is the production version used when the flow is invoked via API.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
version_idstringYesID of a published version

Object Model Tools

Manage reusable schema types at the project level.

create_object_model

Create a reusable schema type at the project level. Object models define structured data shapes that blocks can reference.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
namestringYesModel name
descriptionstringNoModel description
fieldsarrayYesNon-empty array of field definitions

update_object_model

Update an existing object model's name, description, or fields. At least one field must be provided.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
object_model_idstringYesObject model UUID
namestringNoNew name
descriptionstringNoNew description
fieldsarrayNoNew field definitions

delete_object_model

Delete an object model from the project.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
object_model_idstringYesObject model UUID

Test Case Tools

Create and manage test cases for flows and blocks.

create_test_case

Create a new test case in a flow. Test cases can be flow-scoped or block-scoped.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
flow_idstringYesFlow UUID
scopeflow, blockYesTest case scope — 'flow' (whole-pipeline test) or 'block' (single-block test). Stored as 'pipeline'/'block' downstream.
namestringYesTest case name
block_idstringNoBlock step ID (required when scope is 'block')
input_dataobjectNoTest input data as key-value pairs
sort_orderintegerNoSort position (0-based)

update_test_case

Update a test case's name, input data, or sort order. At least one field must be provided.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
test_case_idstringYesTest case UUID
namestringNoNew name
input_dataobjectNoNew input data
sort_orderintegerNoNew sort position

delete_test_case

Soft-delete a test case.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
test_case_idstringYesTest case UUID

duplicate_test_case

Duplicate a test case. The server mints the new ID and resolves a non-colliding name.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
test_case_idstringYesTest case UUID to duplicate

reorder_test_cases

Reorder test cases within a flow and scope. Pass an ordered list of test case IDs; sort_order is set from list position.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
flow_idstringYesFlow UUID
scopeflow, blockYesScope: 'flow' or 'block'
test_case_idsarrayYesOrdered list of test case UUIDs
block_idstringNoBlock step ID (required when scope is 'block')

Other Tools

list_projects

List all projects accessible to the authenticated user. Returns each project's UUID (id), name, slug, description, and organization details. Call this first when the user references a project by name to resolve it to a project_id for other tools (list_flows, hydrate_project, create_flow, etc.).

ParameterTypeRequiredDescription
limitintegerNoMax projects to return (default 100)
offsetintegerNoNumber of projects to skip for pagination (default 0)

get_test_run_trace

Get the full trace for a test run: run summary plus per-step details including input/output snapshots, token counts, model used, cost, and error context. Use the runId returned by run_test_case to inspect what each block received and produced — essential for debugging test failures.

ParameterTypeRequiredDescription
flow_run_idstringYesFlow run UUID (the runId returned by run_test_case)

get_step_trace

Get the trace for a single step within a test run. Returns detailed input/output snapshots, token usage, model, cost, and error context for the step. Use attempt='all' to see retry history or a specific attempt number.

ParameterTypeRequiredDescription
flow_run_idstringYesFlow run UUID
step_idstringYesStep ID of the block to inspect
attemptstringNoWhich attempt to return: 'latest' (default), 'all', or a number (e.g. '1')

run_test_case

Execute a test case and return results. Runs the test against the current draft state of the flow, streaming block-by-block execution internally and returning a summary with per-step outputs, token usage, and pass/fail status. Blocks until the run completes (may take 30-120s for multi-block pipelines).

ParameterTypeRequiredDescription
test_case_idstringYesTest case UUID
input_overrideobjectNoOverride the test case's saved input data for this run (optional)

run_all_tests

Run all test cases for a flow and return aggregated results. Lists test cases matching the given flow_id (and optional scope/block_id filters), executes each sequentially, and returns a summary with total/passed/failed counts and per-test results. Individual test failures don't abort the batch.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
scopepipeline, block, loopNoFilter by stored scope (optional — omit to run all scopes). Storage values are 'pipeline'/'block'/'loop' — note 'flow' is the API alias for 'pipeline' on the create side, but the filter expects the storage value.
block_idstringNoBlock step ID — required when scope is 'block' or 'loop'

run_flow

Execute a flow end-to-end ad-hoc with inline inputs and return an aggregated result. Use this for exploratory pipeline iteration: try different inputs against a flow without polluting list_test_cases with throwaway test cases. Does NOT save a test case; for repeatable assertions use create_test_case + run_test_case. Result shape matches run_test_case — runId, status, durationMs, steps[], totalPromptTokens, totalCompletionTokens, totalCostUsd. Pass the returned runId to get_test_run_trace(runId) for the full trace.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID to execute
input_dataobjectNoInline inputs for the flow (matches the flow's global input schema). Defaults to empty object.
versionstringNoWhich flow version to execute against. Omit or pass 'draft' (default) to run the working copy; 'production' runs the flow's current production version (400 if unset); an integer string like '3' runs published version_number=3. Unknown values are rejected with 400 INVALID_VERSION.

run_block

Execute a single block ad-hoc with inline inputs and return an aggregated result. Use this for inner-loop iteration: when get_test_run_trace points at a divergent block, run_block lets you verify a prompt or schema edit on that block in one call — cheaper than re-running the full pipeline via run_all_tests. Does NOT save a test case; for repeatable assertions use create_test_case + run_test_case. Returns output, tokens_in/out, cost_usd, latency_ms, model_used, version_used, plus a flow_run_id you can pass to get_step_trace(flow_run_id, step_id) for the full trace.

ParameterTypeRequiredDescription
project_idstringYesProject UUID
flow_idstringYesFlow UUID containing the block
step_idstringYesTree-node id of the block to execute — the id field on each block node returned by get_flow_structure, or the step_id field on get_block. (The row UUID is also accepted for forgiveness, but step_id is the canonical input.)
input_dataobjectNoInline inputs for the block (matches the block's input schema). Check get_block(step_id).input_schema for the expected field names — don't guess from the user's phrasing. Defaults to empty object.
versionstringNoWhich flow version to execute against. Omit or pass 'draft' (default) to run the working copy; 'production' runs the flow's current production version (400 if unset); an integer string like '3' runs published version_number=3. Unknown values are rejected with 400 INVALID_VERSION.

list_test_cases

List test cases. Provide flow_id (lists all tests in that flow), flow_id + step_id (lists tests for that block within that flow), or step_id alone (lists tests for that block across every flow you have access to). Optional scope filter ('pipeline'|'block'|'loop') narrows results. Use this to discover existing tests before creating duplicates or to find tests to re-run after editing a block. step_id is the tree-node id on a block — the id field on each block node returned by get_flow_structure, or the step_id field on get_block.

ParameterTypeRequiredDescription
flow_idstringNoFlow UUID (optional if step_id is given)
step_idstringNoTree-node id of a block — the id field returned by get_flow_structure or the step_id field on get_block. Optional if flow_id is given.
scopepipeline, block, loopNoFilter by stored scope (optional — omit to list all scopes). Storage values are 'pipeline'/'block'/'loop' — note 'flow' is the API alias for 'pipeline' on the create side, but the filter expects the storage value.

update_block

Atomically update any combination of a block's mutable fields in one call: draft, notes, model, config, processor_config, input_schema, output_schema. Server applies all changes in a single transaction with one version bump and one oplog entry — preferred over chaining the single-field tools (update_block_draft, update_block_config, etc.) which produce one version bump and one oplog entry each. At least one mutable field must be provided. Optimistic concurrency — see the base_version parameter for omit-vs-supply semantics.

ParameterTypeRequiredDescription
flow_idstringYesFlow UUID
step_idstringYesStep ID of the block
draftstringNoNew prompt text (full replacement). For code blocks: function BODY only (Python). See https://docs.noukai.dev/docs/mcp-reference/block-runtime-contract.
notesstringNoNew notes text (full replacement).
modelstringNoModel identifier (e.g. 'anthropic/claude-sonnet-4-6').
configobjectNoBlock config (maxTokens, temperature, etc.).
processor_configobjectNoProcessor-specific config.
input_schemaobjectNoNew input schema (full replacement).
output_schemaobjectNoNew output schema (full replacement).
base_versionintegerNoContent version to check against. Omit to auto-detect — the wrapper reads the current version and transparently retries once if a parallel writer slips in (best-effort). Supply explicitly to assert optimistic concurrency — a stale version returns a soft-error conflict response with the current version, no retry (assertive).

get_pipeline_authoring_guide

IMPORTANT: the server does NOT match intent to patterns/recipes — YOU read the returned summaries and decide which apply. intent is passthrough only. Call this tool FIRST whenever the user wants to create, edit, or refactor a pipeline. Returns: the structured workflow (clarify → propose design → scaffold → test → iterate → report), the safety + model rules, and the full pattern/recipe summary list. Drill into specific items with get_pipeline_pattern(name) or get_pipeline_recipe(name). Content tailoring happens via mode (create/edit/refactor), not via intent.

ParameterTypeRequiredDescription
intentstringYesThe user's natural-language description of what they want the pipeline to do. Currently passthrough only; you (the LLM) decide which patterns/recipes apply.
modecreate, edit, refactorNoDefault 'create'. Use 'edit' or 'refactor' to include the draft-preflight step in the returned workflow.

get_pipeline_pattern

Return the full body and metadata of a single pattern by its machine-readable name (e.g. 'single-block', 'sequential-decomposition'). Names come from the patterns list returned by get_pipeline_authoring_guide.

ParameterTypeRequiredDescription
namestringYesPattern slug, e.g. 'single-block'.

get_pipeline_recipe

Return the full body, block_template, and edge_case_categories of a single recipe by name (e.g. 'essay-feedback', 'dictionary-lookup'). Names come from the recipes list returned by get_pipeline_authoring_guide. The block_template field is structured: each item has name/type/purpose/prompt_skeleton/recommended_model/output_schema — exactly the shape you need to call add_block / update_block_draft / update_block_output_schema.

ParameterTypeRequiredDescription
namestringYesRecipe slug, e.g. 'essay-feedback'.