if_else
A conditional system tool that executes different blocks of tools based on a condition.
Fields
Returns
Example
Last updated
A conditional system tool that executes different blocks of tools based on a condition.
Last updated
Name | Type | Description | Required |
---|---|---|---|
Type | Description |
---|---|
returns_key
string
The name of the variable inside the executed block scope to use for the return value.
condition
prompt
The condition to evaluate which determines the branch of execution.
if_true.if
array
The tool to execute if the condition is true. If this value is not set, the block will be skipped.
if_false.else
array
The tool to execute if the condition is false. If this value is not set, the block will be skipped.
prompt
The value of the variable inside the executed block scope to use for the return value. This only exists if a returns_key is specified.