subagent_conditional
Evaluate a condition using AI and execute different tasks based on the result, enabling dynamic workflow control.
Instructions
Execute conditional branching based on AI decision.
First calls AI to evaluate a condition, then executes either true_task or false_task based on the decision. Useful for dynamic workflow control.
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": {
"condition_task": "<condition_task>",
"true_task": "<true_task>",
"false_task": "<false_task>"
},
"name": "subagent_conditional"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| condition_task | Yes | JSON string of task to evaluate condition {provider, model, messages} AI should return "true" or "false" in response | |
| true_task | Yes | JSON string of task to execute if condition is true | |
| false_task | Yes | JSON string of task to execute if condition is false |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |