Workflow Tools
Current status: CatGo now has two different AI-facing workflow surfaces. Older docs that treated them as one layer are outdated.
1. Frontend Chat Workflow Tools
Source:
src/lib/chat/workflow-tools.tssrc/lib/chat/workflow-tool-executor.ts
These are the tools used by the in-app chat panel. They are separate named tools, not a single action router.
Available tool names:
list_workflowsget_workflow_statusget_step_errorsuggest_paramsget_node_definitionsget_workflow_templatesvalidate_workflowcreate_workflowadd_noderemove_nodeconnect_nodesset_node_paramsrun_workflowpause_workflow
Behavior notes:
create_workflowcreates an empty graph in the frontend chat path.- If the user is inside a project dashboard, the executor tries to auto-assign the new workflow to the active project.
- Mutation tools require an active
WorkflowEditorinstance.
2. MCP Workflow Tool
Source:
server/mcp_tools/tools/misc.pyserver/mcp_tools/server.pyserver/mcp_tools/server_claude_code.py
This is the unified MCP tool:
catgo_workflow
It uses an action field:
listtemplatesnode_typescreategetadd_noderemove_nodeconnectset_paramsvalidaterunpauseresumestatusstep_error
Behavior notes:
- MCP
createcurrently creates a workflow with an initialstructure_inputnode already present. - MCP
runsends the run request immediately; it does not open a UI dialog for confirmation. - MCP
connectdefaultsfrom_handleandto_handletostructureif omitted.
3. Important Difference
The frontend chat tools and the MCP tool do not behave identically.
Most important mismatch:
- Frontend chat
create_workflow-> empty graph - MCP
catgo_workflow(action="create")-> graph pre-populated withstructure_input
When updating prompts, skills, or agent instructions, do not assume these two surfaces are interchangeable.
4. Safe Authoring Pattern
For MCP / CatBot:
node_typescreategetadd_nodeset_paramsconnectwith explicit handles when the graph is not triviallystructure -> structurevalidategetrunonly after explicitrun_config
For frontend chat:
create_workflowget_node_definitionsadd_nodeset_node_paramsconnect_nodesvalidate_workflowrun_workflow