PersistentAI API Documentation / @persistent-ai/fireflow-types / createNodeFromToolDefinition
Function: createNodeFromToolDefinition()
createNodeFromToolDefinition(
toolDef,nodeId?):BaseNodeCompositional
Defined in: packages/fireflow-types/src/tool/node-from-tool.ts:26
Creates a fresh node instance from a FireFlowToolDefinition. Completely independent of any existing node in the flow.
Parameters
toolDef
The tool definition containing node type and schema
nodeId?
string
Optional custom node ID (auto-generated if not provided)
Returns
BaseNodeCompositional
Fresh node instance ready for configuration
Throws
Error if fireflow.nodeType is missing or invalid