Skip to main content
Glama

Set logic

editor_setLogic

Overwrite the single conditional rule on a logic element identified by nodeId. Insert separate logic elements for additional rules; delete the element to remove its rule. Referenced question, page, and field IDs are validated. Read the document first with editor_getDocument to get valid IDs. When a rule shows a question, also set isHidden:true on that question so it is hidden by default. See load_skill("logic-rules").

Input Schema

NameRequiredDescriptionDefault
ruleYesSingle replacement rule. Insert another logic block for each additional rule.
formIdYesForm ID
nodeIdYesnodeId of the logic element whose rule is being overwritten (from editor_getDocument).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / logicRule
      Removed value: -{
      -  "description": "Single replacement rule. Insert another logic block for each additional rule.",
      -  "properties": {
      -    "actions": {
      -      "items": {
      -        "oneOf": [
      -          {
      -            "properties": {
      -              "targets": {
      -                "items": {
      -                  "oneOf": [
      -                    {
      -                      "properties": {
      -                        "questionId": {
      -                          "description": "Any element with isHidden (question/paragraph/header/image/embed/list-item/table/row/column). Name kept for back-compat.",
      -                          "type": "string"
      -                        },
      -                        "scope": {
      -                          "const": "question",
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "scope",
      -                        "questionId"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    {
      -                      "properties": {
      -                        "optionId": {
      -                          "type": "string"
      -                        },
      -                        "questionId": {
      -                          "type": "string"
      -                        },
      -                        "scope": {
      -                          "const": "option",
      -                          "type": "string"
      -                        }
      -                      },
      -                      "required": [
      -                        "scope",
      -                        "questionId",
      -                        "optionId"
      -                      ],
      -                      "type": "object"
      -                    }
      -                  ]
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "enum": [
      -                  "show",
      -                  "hide"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "targets"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "questionIds": {
      -                "items": {
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "enum": [
      -                  "require",
      -                  "optional"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "questionIds"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "pageId": {
      -                "type": "string"
      -              },
      -              "type": {
      -                "const": "setNextPage",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "pageId"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "message": {
      -                "type": "string"
      -              },
      -              "type": {
      -                "enum": [
      -                  "preventNextPageNavigation",
      -                  "preventFormSubmit"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "fieldId": {
      -                "description": "Target field id to mutate. Pass the nodeId of a calculated-field element (hidden-field targets are rejected).",
      -                "type": "string"
      -              },
      -              "operation": {
      -                "description": "Number fields: add/subtract/multiply/divide/set/reset (use set, never assign, for the first step of a numeric chain). Text fields: assign/concatenate/prepend/reset. Divide: literal 0 is rejected; a 0, empty or non-numeric fieldRef skips the step.",
      -                "oneOf": [
      -                  {
      -                    "properties": {
      -                      "op": {
      -                        "const": "reset",
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "op"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  {
      -                    "properties": {
      -                      "op": {
      -                        "enum": [
      -                          "add",
      -                          "subtract",
      -                          "multiply",
      -                          "divide",
      -                          "set",
      -                          "assign",
      -                          "concatenate",
      -                          "prepend"
      -                        ],
      -                        "type": "string"
      -                      },
      -                      "value": {
      -                        "oneOf": [
      -                          {
      -                            "properties": {
      -                              "kind": {
      -                                "const": "literal",
      -                                "type": "string"
      -                              },
      -                              "value": {
      -                                "type": [
      -                                  "number",
      -                                  "string",
      -                                  "boolean"
      -                                ]
      -                              }
      -                            },
      -                            "required": [
      -                              "kind",
      -                              "value"
      -                            ],
      -                            "type": "object"
      -                          },
      -                          {
      -                            "properties": {
      -                              "fieldId": {
      -                                "type": "string"
      -                              },
      -                              "kind": {
      -                                "const": "fieldRef",
      -                                "type": "string"
      -                              }
      -                            },
      -                            "required": [
      -                              "kind",
      -                              "fieldId"
      -                            ],
      -                            "type": "object"
      -                          }
      -                        ]
      -                      }
      -                    },
      -                    "required": [
      -                      "op",
      -                      "value"
      -                    ],
      -                    "type": "object"
      -                  }
      -                ]
      -              },
      -              "type": {
      -                "const": "calculateValue",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "fieldId",
      -              "operation"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "inputId": {
      -                "description": "Target payment input id — the nodeId of a payment-input element (not the question id).",
      -                "type": "string"
      -              },
      -              "op": {
      -                "description": "How to apply value (default 'set'): 'set' replaces the amount; 'increase'/'decrease' adjust the configured base price. Adjustments stack across rules in document order and clamp at 0.",
      -                "enum": [
      -                  "set",
      -                  "increase",
      -                  "decrease"
      -                ],
      -                "type": "string"
      -              },
      -              "type": {
      -                "const": "setPaymentAmount",
      -                "type": "string"
      -              },
      -              "value": {
      -                "description": "Amount: a literal number, or a fieldRef to a field / calculated value. For increase/decrease this is the delta.",
      -                "oneOf": [
      -                  {
      -                    "properties": {
      -                      "kind": {
      -                        "const": "literal",
      -                        "type": "string"
      -                      },
      -                      "value": {
      -                        "type": [
      -                          "number",
      -                          "string",
      -                          "boolean"
      -                        ]
      -                      }
      -                    },
      -                    "required": [
      -                      "kind",
      -                      "value"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  {
      -                    "properties": {
      -                      "fieldId": {
      -                        "type": "string"
      -                      },
      -                      "kind": {
      -                        "const": "fieldRef",
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "kind",
      -                      "fieldId"
      -                    ],
      -                    "type": "object"
      -                  }
      -                ]
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "inputId",
      -              "value"
      -            ],
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "minItems": 1,
      -      "type": "array"
      -    },
      -    "conditionGroup": {
      -      "description": "Top-level: pass directly as conditionGroup. Nested { type: \"group\", group } children capped at 2 levels.",
      -      "properties": {
      -        "children": {
      -          "items": {
      -            "anyOf": [
      -              {
      -                "properties": {
      -                  "condition": {
      -                    "properties": {
      -                      "field": {
      -                        "description": "Field ID — question input, calculated-field, or hidden-field (not a question or container ID).",
      -                        "type": "string"
      -                      },
      -                      "operator": {
      -                        "enum": [
      -                          "equals",
      -                          "notEquals",
      -                          "contains",
      -                          "notContains",
      -                          "greaterThan",
      -                          "lessThan",
      -                          "isEmpty",
      -                          "isNotEmpty",
      -                          "startsWith",
      -                          "endsWith",
      -                          "greaterThanOrEqual",
      -                          "lessThanOrEqual",
      -                          "isBetween",
      -                          "hasCheckedAnyOf",
      -                          "hasNotCheckedAnyOf",
      -                          "hasCheckedAllOf",
      -                          "hasCheckedExactly",
      -                          "isOn",
      -                          "isOff",
      -                          "isSigned",
      -                          "isNotSigned",
      -                          "hasFile",
      -                          "hasNoFile",
      -                          "isCompleted",
      -                          "isNotCompleted",
      -                          "isBefore",
      -                          "isAfter",
      -                          "isRankedFirst",
      -                          "isRankedLast",
      -                          "isRankedAbove",
      -                          "rowAnswerIs",
      -                          "rowAnswerIsNot",
      -                          "rowIsAnswered",
      -                          "rowIsNotAnswered",
      -                          "amountEquals",
      -                          "amountGreaterThan",
      -                          "amountLessThan"
      -                        ],
      -                        "type": "string"
      -                      },
      -                      "value": {
      -                        "description": "Omit for isEmpty/isNotEmpty."
      -                      }
      -                    },
      -                    "required": [
      -                      "field",
      -                      "operator"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "type": {
      -                    "const": "condition",
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "type",
      -                  "condition"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "properties": {
      -                  "group": {
      -                    "description": "Nested group (max depth 2): children must be leaf conditions only.",
      -                    "properties": {
      -                      "children": {
      -                        "items": {
      -                          "properties": {
      -                            "condition": {
      -                              "properties": {
      -                                "field": {
      -                                  "description": "Field ID — question input, calculated-field, or hidden-field (not a question or container ID).",
      -                                  "type": "string"
      -                                },
      -                                "operator": {
      -                                  "enum": [
      -                                    "equals",
      -                                    "notEquals",
      -                                    "contains",
      -                                    "notContains",
      -                                    "greaterThan",
      -                                    "lessThan",
      -                                    "isEmpty",
      -                                    "isNotEmpty",
      -                                    "startsWith",
      -                                    "endsWith",
      -                                    "greaterThanOrEqual",
      -                                    "lessThanOrEqual",
      -                                    "isBetween",
      -                                    "hasCheckedAnyOf",
      -                                    "hasNotCheckedAnyOf",
      -                                    "hasCheckedAllOf",
      -                                    "hasCheckedExactly",
      -                                    "isOn",
      -                                    "isOff",
      -                                    "isSigned",
      -                                    "isNotSigned",
      -                                    "hasFile",
      -                                    "hasNoFile",
      -                                    "isCompleted",
      -                                    "isNotCompleted",
      -                                    "isBefore",
      -                                    "isAfter",
      -                                    "isRankedFirst",
      -                                    "isRankedLast",
      -                                    "isRankedAbove",
      -                                    "rowAnswerIs",
      -                                    "rowAnswerIsNot",
      -                                    "rowIsAnswered",
      -                                    "rowIsNotAnswered",
      -                                    "amountEquals",
      -                                    "amountGreaterThan",
      -                                    "amountLessThan"
      -                                  ],
      -                                  "type": "string"
      -                                },
      -                                "value": {
      -                                  "description": "Omit for isEmpty/isNotEmpty."
      -                                }
      -                              },
      -                              "required": [
      -                                "field",
      -                                "operator"
      -                              ],
      -                              "type": "object"
      -                            },
      -                            "type": {
      -                              "const": "condition",
      -                              "type": "string"
      -                            }
      -                          },
      -                          "required": [
      -                            "type",
      -                            "condition"
      -                          ],
      -                          "type": "object"
      -                        },
      -                        "minItems": 1,
      -                        "type": "array"
      -                      },
      -                      "combinator": {
      -                        "enum": [
      -                          "AND",
      -                          "OR"
      -                        ],
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "combinator",
      -                      "children"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "type": {
      -                    "const": "group",
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "type",
      -                  "group"
      -                ],
      -                "type": "object"
      -              }
      -            ]
      -          },
      -          "minItems": 1,
      -          "type": "array"
      -        },
      -        "combinator": {
      -          "enum": [
      -            "AND",
      -            "OR"
      -          ],
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "combinator",
      -        "children"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "required": [
      -    "conditionGroup",
      -    "actions"
      -  ],
      -  "type": "object"
      -}
    • addedInput schema / properties / rule
      Added value: +{
      +  "description": "Single replacement rule. Insert another logic block for each additional rule.",
      +  "properties": {
      +    "actions": {
      +      "items": {
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "targets": {
      +                "items": {
      +                  "oneOf": [
      +                    {
      +                      "properties": {
      +                        "questionId": {
      +                          "description": "Any element with isHidden (question/paragraph/header/image/embed/list-item/table/row/column). Name kept for back-compat.",
      +                          "type": "string"
      +                        },
      +                        "scope": {
      +                          "const": "question",
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "scope",
      +                        "questionId"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    {
      +                      "properties": {
      +                        "optionId": {
      +                          "type": "string"
      +                        },
      +                        "questionId": {
      +                          "type": "string"
      +                        },
      +                        "scope": {
      +                          "const": "option",
      +                          "type": "string"
      +                        }
      +                      },
      +                      "required": [
      +                        "scope",
      +                        "questionId",
      +                        "optionId"
      +                      ],
      +                      "type": "object"
      +                    }
      +                  ]
      +                },
      +                "type": "array"
      +              },
      +              "type": {
      +                "enum": [
      +                  "show",
      +                  "hide"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "targets"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "questionIds": {
      +                "items": {
      +                  "type": "string"
      +                },
      +                "type": "array"
      +              },
      +              "type": {
      +                "enum": [
      +                  "require",
      +                  "optional"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "questionIds"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "pageId": {
      +                "type": "string"
      +              },
      +              "type": {
      +                "const": "setNextPage",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "pageId"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "message": {
      +                "type": "string"
      +              },
      +              "type": {
      +                "enum": [
      +                  "preventNextPageNavigation",
      +                  "preventFormSubmit"
      +                ],
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "fieldId": {
      +                "description": "Target field id to mutate. Pass the nodeId of a calculated-field element (hidden-field targets are rejected).",
      +                "type": "string"
      +              },
      +              "operation": {
      +                "description": "Number fields: add/subtract/multiply/divide/set/reset (use set, never assign, for the first step of a numeric chain). Text fields: assign/concatenate/prepend/reset. Divide: literal 0 is rejected; a 0, empty or non-numeric fieldRef skips the step.",
      +                "oneOf": [
      +                  {
      +                    "properties": {
      +                      "op": {
      +                        "const": "reset",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "op"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "properties": {
      +                      "op": {
      +                        "enum": [
      +                          "add",
      +                          "subtract",
      +                          "multiply",
      +                          "divide",
      +                          "set",
      +                          "assign",
      +                          "concatenate",
      +                          "prepend"
      +                        ],
      +                        "type": "string"
      +                      },
      +                      "value": {
      +                        "oneOf": [
      +                          {
      +                            "properties": {
      +                              "kind": {
      +                                "const": "literal",
      +                                "type": "string"
      +                              },
      +                              "value": {
      +                                "type": [
      +                                  "number",
      +                                  "string",
      +                                  "boolean"
      +                                ]
      +                              }
      +                            },
      +                            "required": [
      +                              "kind",
      +                              "value"
      +                            ],
      +                            "type": "object"
      +                          },
      +                          {
      +                            "properties": {
      +                              "fieldId": {
      +                                "type": "string"
      +                              },
      +                              "kind": {
      +                                "const": "fieldRef",
      +                                "type": "string"
      +                              }
      +                            },
      +                            "required": [
      +                              "kind",
      +                              "fieldId"
      +                            ],
      +                            "type": "object"
      +                          }
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "op",
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "type": {
      +                "const": "calculateValue",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "fieldId",
      +              "operation"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "inputId": {
      +                "description": "Target payment input id — the nodeId of a payment-input element (not the question id).",
      +                "type": "string"
      +              },
      +              "op": {
      +                "description": "How to apply value (default 'set'): 'set' replaces the amount; 'increase'/'decrease' adjust the configured base price. Adjustments stack across rules in document order and clamp at 0.",
      +                "enum": [
      +                  "set",
      +                  "increase",
      +                  "decrease"
      +                ],
      +                "type": "string"
      +              },
      +              "type": {
      +                "const": "setPaymentAmount",
      +                "type": "string"
      +              },
      +              "value": {
      +                "description": "Amount: a literal number, or a fieldRef to a field / calculated value. For increase/decrease this is the delta.",
      +                "oneOf": [
      +                  {
      +                    "properties": {
      +                      "kind": {
      +                        "const": "literal",
      +                        "type": "string"
      +                      },
      +                      "value": {
      +                        "type": [
      +                          "number",
      +                          "string",
      +                          "boolean"
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "kind",
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "properties": {
      +                      "fieldId": {
      +                        "type": "string"
      +                      },
      +                      "kind": {
      +                        "const": "fieldRef",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "kind",
      +                      "fieldId"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "type",
      +              "inputId",
      +              "value"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "minItems": 1,
      +      "type": "array"
      +    },
      +    "conditionGroup": {
      +      "description": "Top-level: pass directly as conditionGroup. Nested { type: \"group\", group } children capped at 2 levels.",
      +      "properties": {
      +        "children": {
      +          "items": {
      +            "anyOf": [
      +              {
      +                "properties": {
      +                  "condition": {
      +                    "properties": {
      +                      "field": {
      +                        "description": "Field ID — question input, calculated-field, or hidden-field (not a question or container ID).",
      +                        "type": "string"
      +                      },
      +                      "operator": {
      +                        "enum": [
      +                          "equals",
      +                          "notEquals",
      +                          "contains",
      +                          "notContains",
      +                          "greaterThan",
      +                          "lessThan",
      +                          "isEmpty",
      +                          "isNotEmpty",
      +                          "startsWith",
      +                          "endsWith",
      +                          "greaterThanOrEqual",
      +                          "lessThanOrEqual",
      +                          "isBetween",
      +                          "hasCheckedAnyOf",
      +                          "hasNotCheckedAnyOf",
      +                          "hasCheckedAllOf",
      +                          "hasCheckedExactly",
      +                          "isOn",
      +                          "isOff",
      +                          "isSigned",
      +                          "isNotSigned",
      +                          "hasFile",
      +                          "hasNoFile",
      +                          "isCompleted",
      +                          "isNotCompleted",
      +                          "isBefore",
      +                          "isAfter",
      +                          "isRankedFirst",
      +                          "isRankedLast",
      +                          "isRankedAbove",
      +                          "rowAnswerIs",
      +                          "rowAnswerIsNot",
      +                          "rowIsAnswered",
      +                          "rowIsNotAnswered",
      +                          "amountEquals",
      +                          "amountGreaterThan",
      +                          "amountLessThan"
      +                        ],
      +                        "type": "string"
      +                      },
      +                      "value": {
      +                        "description": "Omit for isEmpty/isNotEmpty."
      +                      }
      +                    },
      +                    "required": [
      +                      "field",
      +                      "operator"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": {
      +                    "const": "condition",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "type",
      +                  "condition"
      +                ],
      +                "type": "object"
      +              },
      +              {
      +                "properties": {
      +                  "group": {
      +                    "description": "Nested group (max depth 2): children must be leaf conditions only.",
      +                    "properties": {
      +                      "children": {
      +                        "items": {
      +                          "properties": {
      +                            "condition": {
      +                              "properties": {
      +                                "field": {
      +                                  "description": "Field ID — question input, calculated-field, or hidden-field (not a question or container ID).",
      +                                  "type": "string"
      +                                },
      +                                "operator": {
      +                                  "enum": [
      +                                    "equals",
      +                                    "notEquals",
      +                                    "contains",
      +                                    "notContains",
      +                                    "greaterThan",
      +                                    "lessThan",
      +                                    "isEmpty",
      +                                    "isNotEmpty",
      +                                    "startsWith",
      +                                    "endsWith",
      +                                    "greaterThanOrEqual",
      +                                    "lessThanOrEqual",
      +                                    "isBetween",
      +                                    "hasCheckedAnyOf",
      +                                    "hasNotCheckedAnyOf",
      +                                    "hasCheckedAllOf",
      +                                    "hasCheckedExactly",
      +                                    "isOn",
      +                                    "isOff",
      +                                    "isSigned",
      +                                    "isNotSigned",
      +                                    "hasFile",
      +                                    "hasNoFile",
      +                                    "isCompleted",
      +                                    "isNotCompleted",
      +                                    "isBefore",
      +                                    "isAfter",
      +                                    "isRankedFirst",
      +                                    "isRankedLast",
      +                                    "isRankedAbove",
      +                                    "rowAnswerIs",
      +                                    "rowAnswerIsNot",
      +                                    "rowIsAnswered",
      +                                    "rowIsNotAnswered",
      +                                    "amountEquals",
      +                                    "amountGreaterThan",
      +                                    "amountLessThan"
      +                                  ],
      +                                  "type": "string"
      +                                },
      +                                "value": {
      +                                  "description": "Omit for isEmpty/isNotEmpty."
      +                                }
      +                              },
      +                              "required": [
      +                                "field",
      +                                "operator"
      +                              ],
      +                              "type": "object"
      +                            },
      +                            "type": {
      +                              "const": "condition",
      +                              "type": "string"
      +                            }
      +                          },
      +                          "required": [
      +                            "type",
      +                            "condition"
      +                          ],
      +                          "type": "object"
      +                        },
      +                        "minItems": 1,
      +                        "type": "array"
      +                      },
      +                      "combinator": {
      +                        "enum": [
      +                          "AND",
      +                          "OR"
      +                        ],
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "combinator",
      +                      "children"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "type": {
      +                    "const": "group",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "type",
      +                  "group"
      +                ],
      +                "type": "object"
      +              }
      +            ]
      +          },
      +          "minItems": 1,
      +          "type": "array"
      +        },
      +        "combinator": {
      +          "enum": [
      +            "AND",
      +            "OR"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "combinator",
      +        "children"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "conditionGroup",
      +    "actions"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "formId",
      -  "nodeId",
      -  "logicRule"
      -]New value: +[
      +  "formId",
      +  "nodeId",
      +  "rule"
      +]
  2. Changed2 schema fields changed
    • removedInput schema / properties / logicRule / properties / actions / items / anyOf
      Removed value: -[
      -  {
      -    "properties": {
      -      "targets": {
      -        "items": {
      -          "anyOf": [
      -            {
      -              "properties": {
      -                "questionId": {
      -                  "description": "Any element with isHidden (question/paragraph/header/image/embed/list-item/table/row/column). Name kept for back-compat.",
      -                  "type": "string"
      -                },
      -                "scope": {
      -                  "const": "question",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "scope",
      -                "questionId"
      -              ],
      -              "type": "object"
      -            },
      -            {
      -              "properties": {
      -                "optionId": {
      -                  "type": "string"
      -                },
      -                "questionId": {
      -                  "type": "string"
      -                },
      -                "scope": {
      -                  "const": "option",
      -                  "type": "string"
      -                }
      -              },
      -              "required": [
      -                "scope",
      -                "questionId",
      -                "optionId"
      -              ],
      -              "type": "object"
      -            }
      -          ]
      -        },
      -        "type": "array"
      -      },
      -      "type": {
      -        "enum": [
      -          "show",
      -          "hide"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "targets"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "questionIds": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "type": {
      -        "enum": [
      -          "require",
      -          "optional"
      -        ],
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "questionIds"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "pageId": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "setNextPage",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "pageId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "message": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "preventNextPageNavigation",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "message": {
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "preventFormSubmit",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "fieldId": {
      -        "description": "Target field id to mutate. Pass the nodeId of a calculated-field element (hidden-field targets are rejected).",
      -        "type": "string"
      -      },
      -      "operation": {
      -        "properties": {
      -          "op": {
      -            "description": "Number fields: add/subtract/multiply/divide/set/reset (use set, never assign, for the first step of a numeric chain). Text fields: assign/concatenate/prepend/reset. Divide by literal 0 is rejected; empty, non-numeric, or zero fieldRef divisors are runtime no-ops.",
      -            "enum": [
      -              "add",
      -              "subtract",
      -              "multiply",
      -              "divide",
      -              "set",
      -              "reset",
      -              "assign",
      -              "concatenate",
      -              "prepend"
      -            ],
      -            "type": "string"
      -          },
      -          "value": {
      -            "anyOf": [
      -              {
      -                "properties": {
      -                  "kind": {
      -                    "const": "literal",
      -                    "type": "string"
      -                  },
      -                  "value": {}
      -                },
      -                "required": [
      -                  "kind",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              {
      -                "properties": {
      -                  "fieldId": {
      -                    "type": "string"
      -                  },
      -                  "kind": {
      -                    "const": "fieldRef",
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "kind",
      -                  "fieldId"
      -                ],
      -                "type": "object"
      -              }
      -            ],
      -            "description": "Omit for reset."
      -          }
      -        },
      -        "required": [
      -          "op"
      -        ],
      -        "type": "object"
      -      },
      -      "type": {
      -        "const": "calculateValue",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "fieldId",
      -      "operation"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "properties": {
      -      "inputId": {
      -        "description": "Target payment input id — the nodeId of a payment-input element (not the question id).",
      -        "type": "string"
      -      },
      -      "op": {
      -        "description": "How to apply value (default 'set'): 'set' replaces the amount; 'increase'/'decrease' adjust the configured base price. Adjustments stack across rules in document order and clamp at 0.",
      -        "enum": [
      -          "set",
      -          "increase",
      -          "decrease"
      -        ],
      -        "type": "string"
      -      },
      -      "type": {
      -        "const": "setPaymentAmount",
      -        "type": "string"
      -      },
      -      "value": {
      -        "anyOf": [
      -          {
      -            "properties": {
      -              "kind": {
      -                "const": "literal",
      -                "type": "string"
      -              },
      -              "value": {}
      -            },
      -            "required": [
      -              "kind",
      -              "value"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "properties": {
      -              "fieldId": {
      -                "type": "string"
      -              },
      -              "kind": {
      -                "const": "fieldRef",
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "kind",
      -              "fieldId"
      -            ],
      -            "type": "object"
      -          }
      -        ],
      -        "description": "Amount: a literal number, or a fieldRef to a field / calculated value. For increase/decrease this is the delta."
      -      }
      -    },
      -    "required": [
      -      "type",
      -      "inputId",
      -      "value"
      -    ],
      -    "type": "object"
      -  }
      -]
    • addedInput schema / properties / logicRule / properties / actions / items / oneOf
      Added value: +[
      +  {
      +    "properties": {
      +      "targets": {
      +        "items": {
      +          "oneOf": [
      +            {
      +              "properties": {
      +                "questionId": {
      +                  "description": "Any element with isHidden (question/paragraph/header/image/embed/list-item/table/row/column). Name kept for back-compat.",
      +                  "type": "string"
      +                },
      +                "scope": {
      +                  "const": "question",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "scope",
      +                "questionId"
      +              ],
      +              "type": "object"
      +            },
      +            {
      +              "properties": {
      +                "optionId": {
      +                  "type": "string"
      +                },
      +                "questionId": {
      +                  "type": "string"
      +                },
      +                "scope": {
      +                  "const": "option",
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "scope",
      +                "questionId",
      +                "optionId"
      +              ],
      +              "type": "object"
      +            }
      +          ]
      +        },
      +        "type": "array"
      +      },
      +      "type": {
      +        "enum": [
      +          "show",
      +          "hide"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "targets"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "questionIds": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "type": {
      +        "enum": [
      +          "require",
      +          "optional"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "questionIds"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "pageId": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "setNextPage",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "pageId"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "message": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "preventNextPageNavigation",
      +          "preventFormSubmit"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "fieldId": {
      +        "description": "Target field id to mutate. Pass the nodeId of a calculated-field element (hidden-field targets are rejected).",
      +        "type": "string"
      +      },
      +      "operation": {
      +        "description": "Number fields: add/subtract/multiply/divide/set/reset (use set, never assign, for the first step of a numeric chain). Text fields: assign/concatenate/prepend/reset. Divide: literal 0 is rejected; a 0, empty or non-numeric fieldRef skips the step.",
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "op": {
      +                "const": "reset",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "op"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "op": {
      +                "enum": [
      +                  "add",
      +                  "subtract",
      +                  "multiply",
      +                  "divide",
      +                  "set",
      +                  "assign",
      +                  "concatenate",
      +                  "prepend"
      +                ],
      +                "type": "string"
      +              },
      +              "value": {
      +                "oneOf": [
      +                  {
      +                    "properties": {
      +                      "kind": {
      +                        "const": "literal",
      +                        "type": "string"
      +                      },
      +                      "value": {
      +                        "type": [
      +                          "number",
      +                          "string",
      +                          "boolean"
      +                        ]
      +                      }
      +                    },
      +                    "required": [
      +                      "kind",
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "properties": {
      +                      "fieldId": {
      +                        "type": "string"
      +                      },
      +                      "kind": {
      +                        "const": "fieldRef",
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "kind",
      +                      "fieldId"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              }
      +            },
      +            "required": [
      +              "op",
      +              "value"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      },
      +      "type": {
      +        "const": "calculateValue",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "fieldId",
      +      "operation"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "properties": {
      +      "inputId": {
      +        "description": "Target payment input id — the nodeId of a payment-input element (not the question id).",
      +        "type": "string"
      +      },
      +      "op": {
      +        "description": "How to apply value (default 'set'): 'set' replaces the amount; 'increase'/'decrease' adjust the configured base price. Adjustments stack across rules in document order and clamp at 0.",
      +        "enum": [
      +          "set",
      +          "increase",
      +          "decrease"
      +        ],
      +        "type": "string"
      +      },
      +      "type": {
      +        "const": "setPaymentAmount",
      +        "type": "string"
      +      },
      +      "value": {
      +        "description": "Amount: a literal number, or a fieldRef to a field / calculated value. For increase/decrease this is the delta.",
      +        "oneOf": [
      +          {
      +            "properties": {
      +              "kind": {
      +                "const": "literal",
      +                "type": "string"
      +              },
      +              "value": {
      +                "type": [
      +                  "number",
      +                  "string",
      +                  "boolean"
      +                ]
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "value"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "properties": {
      +              "fieldId": {
      +                "type": "string"
      +              },
      +              "kind": {
      +                "const": "fieldRef",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "kind",
      +              "fieldId"
      +            ],
      +            "type": "object"
      +          }
      +        ]
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "inputId",
      +      "value"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false and destructiveHint=false, so the bar is lower, yet the description adds real behavior: rule replacement semantics (one rule per element), ID validation on referenced questions/pages/fields, and the prerequisite of reading the document first. The non-obvious side-effect requirement (also set isHidden:true on shown questions) is especially valuable. It slightly undersells the replace-existing-rule data loss relative to destructiveHint=false, keeping it from a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, front-loaded with the core action and replacement semantics, then prerequisites, then the pitfalls, then a pointer to deeper docs. Every sentence carries distinct actionable information with no padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex nested-schema mutation tool with no output schema, the description covers action, alternatives, removal path, ID validation, prerequisites, and a tricky default-visibility side effect. No further information is needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the nested rule/condition/action structures are documented exhaustively in the schema itself, including 'Single replacement rule. Insert another logic block for each additional rule.' The description's mention of a 'single conditional rule' and nodeId therefore largely restates schema content, so baseline 3 is right.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb+resource: 'Overwrite the single conditional rule on a logic element identified by nodeId.' This immediately distinguishes it from sibling editor_insertLogic, which the description implicitly covers by telling the agent to insert separate logic elements for additional rules.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use routing: use this to overwrite, insert separate elements for additional rules, delete the element to remove a rule, and read editor_getDocument first for valid IDs. It even points at load_skill("logic-rules") for deeper guidance, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.