Tool Listing
All 45 Noukai MCP tools organized by category with parameter schemas.
Noukai exposes 45 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. 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 |
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) |
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.
| 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) |
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). Uses optimistic concurrency — omit base_version to auto-detect, or provide it for rapid sequential edits.
| 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. |
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. Uses optimistic concurrency.
| 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. |
update_block_input_schema
Replace a block's input schema (full replacement). Uses optimistic concurrency.
| 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. |
update_block_output_schema
Replace a block's output schema (full replacement). Uses optimistic concurrency.
| 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. |
update_block_notes
Replace a block's notes text (full replacement). Uses optimistic concurrency.
| 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. |
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. Uses optimistic concurrency.
| 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. |
update_flow_global_input
Replace a flow's global input schema (full replacement). Uses optimistic concurrency.
| 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. |
update_flow_trigger
Replace a flow's trigger configuration (full replacement). Uses optimistic concurrency.
| 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. |
Checkpoint Tools
Save and manage block-level prompt snapshots.
create_checkpoint
Save the current block prompt as a named checkpoint (snapshot). Useful for tracking prompt iterations.
| 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_checkpoint
Delete a checkpoint from a block.
| 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 |
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, manage, and execute 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 | string | Yes | 'flow' or 'block' |
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') |
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 |
Returns: { runId, status, durationMs, steps: [...], totalPromptTokens, totalCompletionTokens, totalCostUsd, error?, errorAtStep?, pipelineOutput? }
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 | flow, block, loop, pipeline | No | Filter by test case scope (omit to run all scopes) |
block_id | string | No | Block step ID — required when scope is 'block' or 'loop' |
Returns: { total, passed, failed, results: [{ testCaseId, testCaseName, status, durationMs, steps, ... }] }