Create workflow
create_workflowWorkflow authoring — create a BRAND-NEW workflow (mints the workflow + its version 1). A workflow composes blocks (api_call, sub_workflow, data) over $input and returns {content_type, output}. Fetch the definition's JSON Schema with get_workflow_definition_schema and author against it. The definition is statically validated BEFORE it is written: on error-severity findings nothing is minted (valid=false, created=false, findings returned) — so you never need a separate validate_workflow pass. On success the result also carries any advisory (warning/info) findings, e.g. a bare identifier that should be $-prefixed, or literal text better authored with language "literal". Pass publish=true to create and publish in one step. (To add a version to a workflow that already exists, use create_workflow_version.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | URL-safe slug, optionally hierarchical (e.g. reports/daily). | |
| publish | No | If true, immediately publish the version this call creates (the common create-then-publish in one step). Defaults to false; omit to leave the version as an unpublished draft. | |
| definition | Yes | The workflow definition, as a JSON object. Fetch the exact JSON Schema it must satisfy with get_workflow_definition_schema and author against it (or copy an existing one with the get_*_version tool). The owning service validates it on submit. | |
| description | No | What this workflow does. | |
| display_name | No | Human-readable name. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | ||
| valid | Yes | ||
| created | Yes | ||
| version | No | ||
| findings | No | ||
| published | Yes | ||
| workflow_id | No |