MCP tool
cascades_generate_workflow
Build a cascade from a plain-English policy description using the Cascades AI builder, then create it (by default) so it is immediately runnable with cascades_trigger_workflow. Use this when the user describes a screening/decision policy in words rather than supplying a node graph. Returns the created cascade (with the AI-generated name and any warnings); pass create:false to preview the generated definition without saving it.
REST operation
This tool makes one call:
POST
/api/v1/workflows/generate
— see generateWorkflow in the API reference for the full response schema and error codes.
Input schema
| Argument | Type | Description |
|---|---|---|
prompt
required
|
string |
Plain-English description of the decision policy to turn into a cascade (max 5 000 characters by default). |
name
|
string |
Optional name override; otherwise the generator names the cascade. |
use_case
|
string |
Optional use case label. Defaults to `tenant_screening`. |
create
|
boolean |
`true` (default) saves the generated cascade and returns `201`; `false` returns the generated definition as a `200` preview without saving. |
environment
|
string |
Target environment: "prod" (default) or "dev".
One of:
dev prod |
Example
What the model sends, and the JSON the tool returns (the REST response, verbatim).
Call
{
"name": "cascades_generate_workflow",
"arguments": {
"prompt": "Approve applicants with a credit score over 680 and no evictions; refer everyone else to review.",
"use_case": "tenant_screening"
}
}Result
{
"data": {
"id": 159,
"object": "workflow",
"name": "Score 680+ and no evictions",
"active": true
},
"warnings": []
}