FlowState Tools Reference
FlowState provides built-in tools for workflow automation. Each tool follows a consistent interface: receive arguments, perform an action, return an exit code.
Tool Categories
Section titled “Tool Categories”Execution Tools
Section titled “Execution Tools”| Tool | Description |
|---|---|
| bash | Execute shell commands |
| claude | Non-interactive Claude prompts |
| claude-code | Interactive Claude Code sessions |
| codex | OpenAI Codex prompts |
| gemini | Google Gemini prompts |
Input/Output Tools
Section titled “Input/Output Tools”| Tool | Description |
|---|---|
| ask-user | Prompt for user input |
| get-gh-issue | Fetch GitHub issue details |
Conditional Tools
Section titled “Conditional Tools”| Tool | Description |
|---|---|
| if-empty | Check if value is empty |
| if-not-empty | Check if value has content |
| if-equal | Check if two values are equal |
| if-not-equal | Check if two values differ |
| if-greater | Numeric comparison: left > right |
| if-less | Numeric comparison: left < right |
| if-greater-equal | Numeric comparison: left >= right |
| if-less-equal | Numeric comparison: left <= right |
Flow Control Tools
Section titled “Flow Control Tools”| Tool | Description |
|---|---|
| switch | Conditional branching |
| pause | Halt execution until resumed |
| sub-flow | Call another workflow |
| parallel | Run tasks concurrently |
| for-each | Iterate over items |
Common Exit Codes
Section titled “Common Exit Codes”All tools follow standard exit code conventions:
| Code | Meaning |
|---|---|
0 | Success |
1 | General error |
2 | Invalid arguments or tool not found |
124 | Timeout exceeded |
130 | User cancelled (Ctrl+C) |
-1 | Pause requested (internal) |
Output Capture
Section titled “Output Capture”Tools that produce stdout can have their output captured:
my-state: tool: bash arguments: command: echo "hello" output: var(greeting)Capture destinations:
var(name)- Store in a workflow variablefile(path)- Write to a file
Tool Interface
Section titled “Tool Interface”Every tool implements:
- Execute - Run with provided arguments
- Validate - Check required arguments before execution
- Log Display - Format for execution logging
Custom tools can be added by implementing the ITool interface in the FlowState codebase.