create_node
Add a new node to a Cognigy.AI flow. Use dryRun mode to validate placement and configuration before creating the node.
Instructions
Creates a new node in a Cognigy.AI flow. MUTATING: This modifies the flow. Use dryRun=true (default) to validate first. Nodes are the building blocks of conversation logic (Say, Question, If, Code, etc.).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"flowId": "<flowId>",
"type": "<type>",
"targetNodeId": "<targetNodeId>"
},
"name": "create_node"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | How to position the new node relative to target: append (after), prepend (before), appendChild/prependChild (as child), insertChildAt (at position), insertAfter, insertBefore | append |
| type | Yes | Node type (e.g., 'say', 'question', 'if', 'code', 'executeFlow'). Use get_node_descriptors to list available types. | |
| label | No | Display label for the node in the flow editor | |
| config | No | Node-specific configuration object. Structure depends on node type. | |
| dryRun | No | If true (default), validates the operation without creating the node. Set to false to actually create. | |
| flowId | Yes | The flow ID where the node will be created | |
| comment | No | Developer comment/note for this node | |
| position | No | Position index when using insertChildAt mode | |
| extension | No | Extension ID if this is a custom extension node | |
| targetNodeId | Yes | The ID of the target node relative to which this node will be positioned |