slang-workflows
v0.1.2Provable, declarative multi-agent workflows for Claude Code (typed .slang, non-LLM executor).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_workflows List workflows
Discover .slang workflow files in the project (.claude/workflows/) and global (~/.claude/workflows/) directories. Returns each flow's name, title, params, and agent count.
get_slang_grammar Get slang grammar
Return a concise slang grammar cheatsheet (constructs + a complete example) so you can GENERATE a workflow on the fly and run it inline via run_workflow(source). Validate generated source with validate_workflow(source) first; run_workflow also rejects parse/static-analysis errors.
validate_workflow Validate workflow
Parse and statically analyze one workflow (deadlock detection, unknown refs, missing converge/budget, orphan outputs) without running it. Identify it by `name` or absolute `path`.
| Parameter | Type | Description |
|---|---|---|
name | string | Flow name or .slang filename (project scope preferred). |
path | string | Absolute path to a .slang file (overrides `name`). |
source | string | Inline .slang source to validate (overrides name/path) — validate generated flows before running. |
run_workflow Run workflow
Parse and run a .slang workflow to completion, dispatching each agent through the Claude Agent SDK and validating results against output contracts. Identify it by `name` or `path`; pass flow `params` as an object. Returns the final flow status and each agent's output. Rejects parse/static-analysis errors before running. Default runs synchronously (returns the final status + each agent's output). Pass background:true to start the run and return a workflow_id immediately, then poll get_trace/get_topology/get_workflow_state to watch it live; @Human escalation only works in synchronous runs.
| Parameter | Type | Description |
|---|---|---|
background | boolean | Start the run and return a workflow_id immediately, then poll get_trace/get_topology/get_workflow_state. (@Human escalation unsupported in background.) |
model | string | Default model for agents without api_configuration (e.g. sonnet). |
name | string | Flow name or .slang filename. |
params | object | Flow parameters as a key/value object. |
path | string | Absolute path to a .slang file (overrides `name`). |
source | string | Inline .slang source (overrides name/path) — e.g. a workflow an LLM generated on the fly. |
get_workflow_state Get workflow state
Return the serialized FlowState for a run started by `run_workflow`: per-agent status, opIndex, bindings, round, budget usage, and flow status. Identify it by `workflow_id`.
| Parameter | Type | Description |
|---|---|---|
workflow_id * | string | Id returned by run_workflow. |
get_topology Get workflow topology (Mermaid)
Return the current agent topology of a run as a Mermaid flowchart (nodes colored by status, plus live sending/waiting edges). Render it inline. Identify it by `workflow_id`.
| Parameter | Type | Description |
|---|---|---|
workflow_id * | string | Id returned by run_workflow. |
get_trace Get workflow trace (Mermaid sequence + event log)
Return a run's execution trace as a Mermaid `sequenceDiagram` (round-by-round: who staked/routed to whom, commits, escalations, terminal event) plus the raw event log. The timeline counterpart to `get_topology`'s snapshot. Render the diagram inline. Identify it by `workflow_id`.
| Parameter | Type | Description |
|---|---|---|
workflow_id * | string | Id returned by run_workflow. |