Skip to content

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

FireFlowToolDefinition

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

Licensed under BUSL-1.1