githubEdit

Workflow Tools

DocFlow MCP provides 8 tools for managing and testing advanced workflows.

list_workflows

List all workflows for the current organization.

Parameters: None

Example Response:

[
  {
    "id": "a1b2c3d4-...",
    "name": "Invoice Approval",
    "version": 3,
    "enabled": true,
    "doc_types": ["INVOICE"],
    "workflow_type": "advanced",
    "created_on": "2025-01-15 10:30:00",
    "last_modified_on": "2025-03-20 14:22:00"
  }
]

get_workflow

Get details of a specific workflow including its node and edge structure.

Parameters:

Parameter
Type
Required
Description

workflow_id

string

Yes

UUID of the workflow

Example Response:

create_advanced_workflow

Create a new advanced workflow with nodes and edges.

Parameters:

Parameter
Type
Required
Description

name

string

Yes

Workflow name (3-126 characters)

description

string

No

Optional description

nodes

array

Yes

Array of workflow nodes

edges

array

Yes

Array of edges connecting nodes

Node Structure

Each node requires:

Field
Type
Description

node_id

string

Unique identifier for the node

node_type

string

when, then, and, or, or delay

position

object

{x: number, y: number} position on canvas

label

string

Display label

card

object

Card configuration (see below)

Edge Structure

Each edge requires:

Field
Type
Description

edge_id

string

Unique identifier for the edge

source_node_id

string

ID of the source node

target_node_id

string

ID of the target node

source_handle

string

success or error (optional)

target_handle

string

input (optional)

Card Configuration

Cards define what a node does. Use list_cards or sdk_list_cards_picker to get available cards.

circle-info

You only need to provide id, card_type, version, and variables for each card. The server automatically enriches cards with display metadata (svg, text, category) from the database.

Example Request:

Example Response:

update_advanced_workflow

Update an existing advanced workflow. You can update any combination of name, description, nodes, and edges.

Parameters:

Parameter
Type
Required
Description

workflow_id

string

Yes

UUID of workflow to update

name

string

No

New name

description

string

No

New description

nodes

array

No

New nodes (replaces all existing nodes)

edges

array

No

New edges (replaces all existing edges)

Example Response:

delete_workflow

Delete a workflow by ID (soft delete).

Parameters:

Parameter
Type
Required
Description

workflow_id

string

Yes

UUID of workflow to delete

Example Response:

test_advanced_workflow

Test an advanced workflow execution. Optionally provide a document ID to test with a real document.

Parameters:

Parameter
Type
Required
Description

workflow_id

string

Yes

UUID of the advanced workflow

doc_id

string

No

UUID of a document to test with

Example Response:

list_test_scenarios

List all workflow test scenarios for the organization.

Parameters: None

Example Response:

list_cards

List all available workflow cards with their conditions and configuration.

Parameters: None

Example Response:

circle-info

Cards have role flags: when_condition (trigger), and_condition (additional condition), and then_condition (action). Use these to determine which node types a card can be used in.

Last updated

Was this helpful?