hdls Workflows
hdls Workflows is a headless, MCP-native automation (if-this-then-that) backend. It manages workflows, if-this-then-that rules, actions, dependencies, and run history, operated entirely through named tools your AI assistant calls. It stands in for tools like Zapier, Make, n8n — same job, no UI to run.
💬 Just ask
"When a deal is won, create an onboarding task — set that rule up for me." · "Show me what's run recently."
You don't call these tools yourself — just tell your assistant in plain English. Everything below is the reference for when you (or your assistant) want the exact details.
How Workflows is organized
The headline entity is the rule — start there, then attach the rest to it. Records connect by reference: an action links to a rule; a dependency links to a workflow and a rule; a run_step links to a run and an action. The run table is an append-only timeline — every change and note lands there and is never edited or deleted.
| Entity | Purpose | Relates to |
|---|---|---|
rule | An if-this-then-that rule: trigger + condition tree; actions live in workflows.action. | workflow |
workflow | Workflow records. | — |
action | An ordered step in a rule's then/else branch (a tool call, message, ticket, etc). | rule |
dependency | A dependency linked to a workflow and a rule. | workflow, rule |
run_step | A run step linked to a run and an action. | run, action |
run | Append-only: each rule firing. The history the AI mines to learn if->then patterns. | workflow, rule |
Common workflows
Each line is one real sequence of tool calls — your assistant chains them for you.
- Set up a rule end to end:
create_workflow→add_rule→add_action - Move a rule through its lifecycle:
create_workflow→activate_workflow
Tools
Call these at https://hdls.ai/api/mcp/workflows. Required fields you must supply; optional fields refine the call. You never pass tenant_id — it is stamped server-side.
Create
| Tool | What it does | Required | Optional |
|---|---|---|---|
create_workflow | Create a new workflow. | name | description, status, data |
Update & advance
| Tool | What it does | Required | Optional |
|---|---|---|---|
add_rule | Add a rule. | workflow_id, name | trigger_type, trigger_match, condition, position, active, data |
add_action | Add an action. | rule_id, kind | branch, config, position |
link_dependency | Link dependency to a related record. | workflow_id, rule_id, depends_on_rule_id | — |
activate_workflow | Activate a workflow. | id | — |
Find & read
| Tool | What it does | Required | Optional |
|---|---|---|---|
list_runs | Search runs by free-text and/or column filters (tenant-scoped, paginated). | — | search, filters, limit, orderBy |
Field lists come from the product's live schema and are embedded in each tool's own description — read the tool description for the exact, current fields.
Field reference
Every field you can set on each record. Custom fields you add live alongside these in data.
rule
| Field | Type | Required | Notes |
|---|---|---|---|
workflow_id | id | Yes | Links to a workflow. |
name | text | Yes | Display name. |
trigger_type | text | ||
trigger_match | json | ||
condition | json | ||
position | number | ||
active | true / false | ||
data | json | Free-form JSON — custom fields live here. |
workflow
| Field | Type | Required | Notes |
|---|---|---|---|
name | text | Yes | Display name. |
description | text | ||
status | text | Lifecycle state. | |
data | json | Free-form JSON — custom fields live here. |
action
| Field | Type | Required | Notes |
|---|---|---|---|
rule_id | id | Yes | Links to a rule. |
branch | text | ||
kind | text | Yes | |
config | json | ||
position | number |
dependency
| Field | Type | Required | Notes |
|---|---|---|---|
workflow_id | id | Yes | Links to a workflow. |
rule_id | id | Yes | Links to a rule. |
depends_on_rule_id | id | Yes | Reference to a related record. |
run_step
| Field | Type | Required | Notes |
|---|---|---|---|
run_id | id | Yes | Links to a run. |
action_id | id | Links to an action. | |
status | text | Lifecycle state. | |
output | json |
Tailor it with custom fields
Add fields without a schema change. add_custom_field defines one, list_custom_fields shows what's defined, and promote_custom_field (admin) shares a personal field with the whole workspace. The value lives in each row's data (JSON) and is set and read through the normal record tools. See Products, tools & custom fields for the full model.
Roles & safety
- Tenant isolation is automatic. Your credential is pinned to one workspace; you never pass
tenant_id, and you can only ever see your own data (enforced by Postgres row-level security). - Role-gated. Permissions run
reader < member < admin < owner. Installing a product and promoting a custom field workspace-wide need admin/owner. - History is append-only. The
runtimeline is never edited or deleted — it's your audit trail.
Connect
On the concierge (https://hdls.ai/api/mcp), run install_product({ slug: "workflows" }) (admin/owner) to enable it for your workspace, then add https://hdls.ai/api/mcp/workflows as a connector in your assistant — see Connect your assistant.
A worked example
The literal call your assistant makes when you ask it to create the headline record:
Tool: create_workflow
Arguments: {
"name": "Acme Corp"
}