Validate Decision Expression
validate_decision_expressionCheck if a DS2 expression compiles using given variables, returning validity and compiler errors/warnings to catch syntax issues early.
Instructions
Check that a DS2 expression compiles: a rule condition or action, a branch or a condition step.
The expression may use the variables in signature, DS2 functions
and custom functions. Returns valid and the compiler's error and
warning lines. A variable the signature does not declare is a warning
(DS2 creates it), not an error.
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": {
"expression": "<expression>"
},
"name": "validate_decision_expression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signature | No | The variables it uses, ``[{"name", "dataType", "direction"}]``. | |
| expression | Yes | The expression, e.g. ``risk_band(credit_score) = 'LOW'``. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||