Save and reuse enhancement workflows
A workflow stores an enhancement pipeline in the connected Runtime for reuse with later scans and existing images. It stores configuration, not your materials, and is not personal account cloud file storage.
Start with an explicit processing goal
Please check available local deskew enhancement and save a configuration suitable for ordinary single-page documents. Explain the chosen steps first, and do not process images when saving it.
Later, ask: “Use the saved workflow for these two images and deliver them in their original order.” Use czur-document-process and, for capture, czur-document-scan. See Install CZUR Skills.
Saving, updating, and deleting are configuration writes. Agents should perform them when explicitly requested, not automatically create or delete workflows just because a user wants to process an image.
Discover capabilities and build a pipeline
Inspect capabilities before choosing configuration:
{
"name": "image.enhance_capabilities",
"arguments": {}
}Local steps include crop_enhance, normalize_spec, rotate, blank_page_detect, and red_green_head. Check available, reasons, parameter defaults / schema, without guessing angles, thresholds, or Providers. This example uses service defaults for available rotate; use it only when those defaults suit the material:
{
"version": "image.enhance.pipeline.v1",
"steps": [
{
"type": "rotate",
"enabled": true,
"on_error": "fail"
}
],
"target": {
"type": "images",
"export_type": "single-page"
}
}steps retains execution order. enabled: false disables a step. on_error: "fail" fails on error; "skip" allows skipping with a warning, not a completed step. The single-page image target can be reused for both independent processing and capture. Document targets cannot be reused in scans.
Save, inspect, and update with MCP
Place the pipeline inside a workflow object. Saving does not upload or process images:
{
"name": "image.enhance_workflow_save",
"arguments": {
"workflow": {
"name": "Local document rotation",
"pipeline": {
"version": "image.enhance.pipeline.v1",
"steps": [
{
"type": "rotate",
"enabled": true,
"on_error": "fail"
}
],
"target": {
"type": "images",
"export_type": "single-page"
}
}
}
}
}Read the actual workflow ID from the save response, then list or inspect workflows. RETURNED_WORKFLOW_ID below is not a predefined ID:
{
"name": "image.enhance_workflow_list",
"arguments": {}
}{
"name": "image.enhance_workflow_get",
"arguments": {
"workflow_id": "RETURNED_WORKFLOW_ID"
}
}To update, supply the same ID and the complete intended configuration; do not treat save as a partial-field patch. For example, change the name while retaining the pipeline:
{
"name": "image.enhance_workflow_save",
"arguments": {
"workflow": {
"workflow_id": "RETURNED_WORKFLOW_ID",
"name": "Reusable document rotation",
"pipeline": {
"version": "image.enhance.pipeline.v1",
"steps": [
{
"type": "rotate",
"enabled": true,
"on_error": "fail"
}
],
"target": {
"type": "images",
"export_type": "single-page"
}
}
}
}
}Review configuration against user intent before execution, avoiding an unintended workflow with a similar name.
Reuse for independent processing or capture
Finish active scanning and wait for any existing long task before processing images:
{
"name": "image.enhance",
"arguments": {
"input_paths": [
"/ABSOLUTE/PATH/TO/page-1.jpg",
"/ABSOLUTE/PATH/TO/page-2.jpg"
],
"workflow_id": "RETURNED_WORKFLOW_ID"
}
}Keep the returned enhancement handle and query:
{
"name": "image.enhance_get",
"arguments": {
"handle": "RETURNED_ENHANCE_HANDLE"
}
}For nonterminal states, query at intervals. After successful terminal download, read every assets[].local_path, file_uri, content_type, size, and warnings. Terminal get releases the handle; repeated queries or resubmission are not a recovery guarantee for failed delivery. See long-running tasks and result files for cancellation and unknown outcomes.
For scanning, attach the configuration directly rather than processing an original image first:
{
"name": "scan.start",
"arguments": {
"device_id": "YOUR_DEVICE_ID",
"page_processing": "single_page",
"color_mode": "auto_optimize",
"format": "jpg",
"workflow_id": "RETURNED_WORKFLOW_ID"
}
}This only starts a session. Follow the scan guide with scan.capture and finally scan.finish. Paper and color processing precede enhancement. Capture targets must be single-page images, without document targets, target.format, target.quality, TIFF-specific fields, or Runtime filesystem paths. Set format with scan parameters.
pipeline and workflow_id are mutually exclusive. Execution resolves the workflow to a pipeline snapshot; later edits do not change that invocation. Do not run scanning and independent long tasks concurrently in one MCP instance.
CLI files and commands
Save this object as workflow.json, rather than saving a bare pipeline:
{
"name": "Local document rotation",
"pipeline": {
"version": "image.enhance.pipeline.v1",
"steps": [
{
"type": "rotate",
"enabled": true,
"on_error": "fail"
}
],
"target": {
"type": "images",
"export_type": "single-page"
}
}
}Discover capabilities and confirm suitability before saving and inspecting:
czur-open image enhance-capabilities --json
czur-open image workflow save "./workflow.json" --json
czur-open image workflow list --json
czur-open image workflow get "RETURNED_WORKFLOW_ID" --jsonYou can also use image workflow save --file "./workflow.json". Substitute the actual returned ID and choose independent enhancement or scanning; running both is unnecessary:
czur-open image enhance "./page-1.jpg" "./page-2.jpg" --workflow "RETURNED_WORKFLOW_ID" --output-dir "./enhanced" --task-timeout 300000 --json
czur-open scan "YOUR_DEVICE_ID" --workflow "RETURNED_WORKFLOW_ID" --format jpg --capture-timeout 60000 --output-dir "./scans" --jsonRead final images from files[].path for enhancement and scans. Each CLI command waits, downloads, and releases its connection. --pipeline and --workflow are mutually exclusive. Set local delivery with --output-dir, not JSON fields target.path, target.output_path, target.dir, or target.output_dir.
Update or delete unneeded configuration
For a CLI update, workflow-update.json can contain this complete object:
{
"workflow_id": "RETURNED_WORKFLOW_ID",
"name": "Reusable document rotation",
"pipeline": {
"version": "image.enhance.pipeline.v1",
"steps": [
{
"type": "rotate",
"enabled": true,
"on_error": "fail"
}
],
"target": {
"type": "images",
"export_type": "single-page"
}
}
}Run the first command to update. Run the second only when deletion is intended, not as routine cleanup after processing:
czur-open image workflow save "./workflow-update.json" --json
czur-open image workflow delete "RETURNED_WORKFLOW_ID" --jsonFor MCP deletion, also confirm the actual ID:
{
"name": "image.enhance_workflow_delete",
"arguments": {
"workflow_id": "RETURNED_WORKFLOW_ID"
}
}Deleting configuration does not delete delivered files, but the ID cannot start new processing afterward. If save, retrieval, or execution fails, inspect the configuration and target Runtime rather than switching workflows automatically or fabricating success. For image-only document targets, configure a separate workflow using PDF / OFD export.