Skip to content

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.

ToolDescription
bashExecute shell commands
claudeNon-interactive Claude prompts
claude-codeInteractive Claude Code sessions
codexOpenAI Codex prompts
geminiGoogle Gemini prompts
ToolDescription
ask-userPrompt for user input
get-gh-issueFetch GitHub issue details
ToolDescription
if-emptyCheck if value is empty
if-not-emptyCheck if value has content
if-equalCheck if two values are equal
if-not-equalCheck if two values differ
if-greaterNumeric comparison: left > right
if-lessNumeric comparison: left < right
if-greater-equalNumeric comparison: left >= right
if-less-equalNumeric comparison: left <= right
ToolDescription
switchConditional branching
pauseHalt execution until resumed
sub-flowCall another workflow
parallelRun tasks concurrently
for-eachIterate over items

All tools follow standard exit code conventions:

CodeMeaning
0Success
1General error
2Invalid arguments or tool not found
124Timeout exceeded
130User cancelled (Ctrl+C)
-1Pause requested (internal)

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 variable
  • file(path) - Write to a file

Every tool implements:

  1. Execute - Run with provided arguments
  2. Validate - Check required arguments before execution
  3. Log Display - Format for execution logging

Custom tools can be added by implementing the ITool interface in the FlowState codebase.