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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
limit | integer | No | Max entries to return (1-100, default 20) |
offset | integer | No | Number 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
name | string | Yes | Block display name |
processor_type | string | Yes | One of: llm, passthrough, code |
target_id | string | No | Step ID of an existing block to insert relative to (sibling-relative mode) |
direction | left, right, top, bottom | No | Where to place the new block relative to target_id |
parent_id | string | No | Parent container/loop ID (parent-absolute mode). Null for root (empty tree only) |
position | integer | No | 0-indexed position within parent's children (parent-absolute mode) |
model | string | No | Model 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. |
prompt | string | No | Initial 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block to remove |
move_block
Move a block (or container) to a new position in the flow tree.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the node to move |
new_parent_id | string | Yes | Target parent container/loop ID |
new_position | integer | Yes | Position 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block to duplicate |
target_parent_id | string | No | Target parent (defaults to same parent) |
target_position | integer | No | Position (defaults to after original) |
wrap_in_container
Wrap one or more adjacent sibling nodes in a new container.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
node_ids | array | Yes | IDs of adjacent sibling nodes to wrap |
container_type | string | Yes | h (sequential) or v (parallel) |
unwrap_container
Remove a container and promote its children to the container's parent.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
container_id | string | Yes | ID of the container to unwrap |
wrap_in_loop
Wrap one or more adjacent sibling nodes in a loop that iterates over an array field.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
node_ids | array | Yes | IDs of adjacent sibling nodes to wrap |
array_field | string | Yes | Name of the array field to iterate over |
loop_id | string | No | Optional client-generated loop ID (server generates one if omitted) |
unwrap_loop
Remove a loop and promote its children to the loop's parent.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
loop_id | string | Yes | ID 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
parent_id | string | Yes | Container or loop ID |
child_order | array | Yes | New order of child IDs |
rename_block
Rename a block's display name.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
name | string | Yes | New name |
change_processor_type
Change a block's processor type (llm, passthrough, or code).
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
processor_type | string | Yes | llm, 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
name | string | Yes | Flow display name |
slug | string | Yes | URL-safe identifier (lowercase, hyphens) |
description | string | No | Flow description |
delete_flow
Delete a flow and all its blocks, checkpoints, and versions (soft-delete). This is destructive.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
content | string | Yes | The new prompt text (full replacement) |
base_version | integer | No | Content 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
model | string | No | Model identifier (e.g. 'anthropic/claude-sonnet-4-6') |
config | object | No | Block config (maxTokens, temperature, etc.) |
processor_config | object | No | Processor-specific config |
base_version | integer | No | Content 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
content | object | Yes | The new input schema (full replacement) |
base_version | integer | No | Content 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
content | object | Yes | The new output schema (full replacement) |
base_version | integer | No | Content 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
content | string | Yes | The new notes text (full replacement) |
base_version | integer | No | Content 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
name | string | No | New flow name |
description | string | No | New flow description |
flow_settings | object | No | New flow settings |
notes | string | No | New flow notes |
base_version | integer | No | Meta 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
content | object | Yes | The new global input schema (full replacement) |
base_version | integer | No | Meta 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
content | object | Yes | The new trigger configuration (full replacement) |
base_version | integer | No | Meta 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
note | string | No | Optional note describing this checkpoint |
delete_block_checkpoint
Delete a block-prompt checkpoint from a block. Not to be confused with delete_eval_checkpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
checkpoint_id | string | Yes | Checkpoint 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
flow_id | string | No | Optional — 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'.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
eval_id | string | No | Optional client-minted UUID; the server mints one when omitted |
name | string | No | Human-readable eval name |
description | string | No | What this eval checks |
judge_prompt | string | Yes | The rubric the judge applies. Required non-empty for ALL judge types, including 'code'. |
judge_model | string | Yes | Model the judge runs on. Required non-empty for ALL judge types, including 'code'. |
judge_provider | OPENROUTER, AZURE_OPENAI, GOOGLE_VERTEX | No | BYOK 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_type | llm, code, schema | No | Judge implementation. Default 'llm'. |
code | string | No | Judge body for judge_type='code'. |
pass_criteria | object | No | How 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
eval_id | string | Yes | Eval definition UUID |
content_version | integer | Yes | REQUIRED 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. |
name | string | No | Human-readable eval name |
description | string | No | What this eval checks |
judge_prompt | string | No | The rubric the judge applies. Required non-empty for ALL judge types, including 'code'. |
judge_model | string | No | Model the judge runs on. Required non-empty for ALL judge types, including 'code'. |
judge_provider | OPENROUTER, AZURE_OPENAI, GOOGLE_VERTEX | No | BYOK 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_type | llm, code, schema | No | Judge implementation. Default 'llm'. |
code | string | No | Judge body for judge_type='code'. |
pass_criteria | object | No | How 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
eval_id | string | Yes | Eval 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
eval_id | string | Yes | UUID of the library eval to attach |
scope | pipeline, block, test-case | Yes | Where the judge runs |
binding_id | string | No | Optional client-minted UUID; the server mints one when omitted |
step_id | string | No | Required when scope='block' |
test_case_id | string | No | Required when scope='test-case' |
activation | object | No | Per-binding activation rules |
severity | error, warning | No | Failure severity. Default 'error'. |
expected | any | No | Expected verdict. Accepted ONLY when scope='test-case' on attach_eval — any other scope is a 400. Pass null to clear it on update. |
sort_order | integer | No | Ordering within the scope |
mode | observe, gate, heal | No | Execution 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_params | object, null | No | Heal policy (mode='heal'). Null clears. |
gate_params | object, null | No | Gate 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID the binding belongs to |
binding_id | string | Yes | Binding UUID (NOT the library eval_id) |
content_version | integer | Yes | REQUIRED 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. |
activation | object | No | Per-binding activation rules |
severity | error, warning | No | Failure severity. Default 'error'. |
expected | any | No | Expected verdict. Accepted ONLY when scope='test-case' on attach_eval — any other scope is a 400. Pass null to clear it on update. |
sort_order | integer | No | Ordering within the scope |
mode | observe, gate, heal | No | Execution 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_params | object, null | No | Heal policy (mode='heal'). Null clears. |
gate_params | object, null | No | Gate 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID the binding belongs to |
binding_id | string | Yes | Binding 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
eval_id | string | Yes | Eval definition UUID |
note | string | No | Optional note describing this checkpoint |
delete_eval_checkpoint
Soft-delete an eval checkpoint. Not to be confused with delete_block_checkpoint.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
eval_id | string | Yes | Eval definition UUID the checkpoint belongs to |
checkpoint_id | string | Yes | Eval 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
eval_id | string | Yes | Eval definition UUID |
checkpoint_id | string, null | No | Eval 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
note | string | No | Version note |
set_production_version
Set which published version is the production version used when the flow is invoked via API.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
version_id | string | Yes | ID 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
name | string | Yes | Model name |
description | string | No | Model description |
fields | array | Yes | Non-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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
object_model_id | string | Yes | Object model UUID |
name | string | No | New name |
description | string | No | New description |
fields | array | No | New field definitions |
delete_object_model
Delete an object model from the project.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
object_model_id | string | Yes | Object 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
flow_id | string | Yes | Flow UUID |
scope | flow, block | Yes | Test case scope — 'flow' (whole-pipeline test) or 'block' (single-block test). Stored as 'pipeline'/'block' downstream. |
name | string | Yes | Test case name |
block_id | string | No | Block step ID (required when scope is 'block') |
input_data | object | No | Test input data as key-value pairs |
sort_order | integer | No | Sort position (0-based) |
update_test_case
Update a test case's name, input data, or sort order. At least one field must be provided.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
test_case_id | string | Yes | Test case UUID |
name | string | No | New name |
input_data | object | No | New input data |
sort_order | integer | No | New sort position |
delete_test_case
Soft-delete a test case.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
test_case_id | string | Yes | Test case UUID |
duplicate_test_case
Duplicate a test case. The server mints the new ID and resolves a non-colliding name.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
test_case_id | string | Yes | Test 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
flow_id | string | Yes | Flow UUID |
scope | flow, block | Yes | Scope: 'flow' or 'block' |
test_case_ids | array | Yes | Ordered list of test case UUIDs |
block_id | string | No | Block 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.).
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | No | Max projects to return (default 100) |
offset | integer | No | Number 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_run_id | string | Yes | Flow 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_run_id | string | Yes | Flow run UUID |
step_id | string | Yes | Step ID of the block to inspect |
attempt | string | No | Which 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).
| Parameter | Type | Required | Description |
|---|---|---|---|
test_case_id | string | Yes | Test case UUID |
input_override | object | No | Override 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
scope | pipeline, block, loop | No | Filter 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_id | string | No | Block 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID to execute |
input_data | object | No | Inline inputs for the flow (matches the flow's global input schema). Defaults to empty object. |
version | string | No | Which 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
project_id | string | Yes | Project UUID |
flow_id | string | Yes | Flow UUID containing the block |
step_id | string | Yes | Tree-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_data | object | No | Inline 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. |
version | string | No | Which 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | No | Flow UUID (optional if step_id is given) |
step_id | string | No | Tree-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. |
scope | pipeline, block, loop | No | Filter 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
flow_id | string | Yes | Flow UUID |
step_id | string | Yes | Step ID of the block |
draft | string | No | New prompt text (full replacement). For code blocks: function BODY only (Python). See https://docs.noukai.dev/docs/mcp-reference/block-runtime-contract. |
notes | string | No | New notes text (full replacement). |
model | string | No | Model identifier (e.g. 'anthropic/claude-sonnet-4-6'). |
config | object | No | Block config (maxTokens, temperature, etc.). |
processor_config | object | No | Processor-specific config. |
input_schema | object | No | New input schema (full replacement). |
output_schema | object | No | New output schema (full replacement). |
base_version | integer | No | Content 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
intent | string | Yes | The user's natural-language description of what they want the pipeline to do. Currently passthrough only; you (the LLM) decide which patterns/recipes apply. |
mode | create, edit, refactor | No | Default '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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Pattern 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Recipe slug, e.g. 'essay-feedback'. |