update_answer_logic
Edit one Answer Logic entry on an answer choice — the per-option (or per-matrix-row/-column) "if / then show" rule that decides whether THAT SPECIFIC choice appears to a respondent. Identify the question with questionId/position, the choice with optionId/optionPosition (for matrixrating, also pass target: "rows" or "columns" first), and the entry with entryIndex (call get_answer_logic first — always 0, since a choice can only ever have one entry). Provide EXACTLY ONE of: conditions and/or visibility together (edits that entry in place — can be combined in one call, matching the builder where both are independently editable on the same entry: conditions replaces the entry's whole condition list, visibility — matrixrating targets only, "show" or "dontShow" — changes whether the row/column shows or hides when the conditions match); deleteConditionIndex (removes one condition — if that empties the entry, the entry is removed too, nothing left dangling); or deleteEntry: true (removes the whole entry; if it was the last entry for this choice, its displayLogics key is removed too). The conditions (replace) path is refused outright (no force override, nothing changed) if a condition's source question comes after the OWNING question (the one this choice belongs to) in the survey. Reorder the questions or pick an earlier source first. visibility on a plain-option (non-matrixrating) target is refused — those choices have no such field at all, matching the builder exactly.
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": {
"surveyId": "<surveyId>",
"entryIndex": "<entryIndex>"
},
"name": "update_answer_logic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | No | Required (and ONLY valid) for a matrixrating question — which axis optionId/optionPosition resolves against. | |
| teamId | No | Which team workspace to act in (ids come from get_account_info or list_surveys). Optional: if omitted, the server uses the team that owns the given surveyId, or your only team. Required for create_survey when you belong to several teams. | |
| optionId | No | The option's/row's/column's own id. Provide this OR optionPosition. | |
| position | No | 0-based index into the survey's questions array. Provide this OR questionId. | |
| surveyId | Yes | The Survey ID containing the question | |
| conditions | No | Replaces this entry's entire condition list. Can be combined with visibility in the same call; mutually exclusive with deleteConditionIndex/deleteEntry. | |
| entryIndex | Yes | Which Answer Logic entry to edit — call get_answer_logic first to see current indices. | |
| questionId | No | The question's id. Provide this OR position. | |
| visibility | No | Matrixrating targets only — "show" means show this row/column when the conditions match, "dontShow" means hide it when they match. Can be combined with conditions in the same call; mutually exclusive with deleteConditionIndex/deleteEntry. Refused for a plain-option target. | |
| deleteEntry | No | true to remove the whole entry. Mutually exclusive with conditions/visibility/deleteConditionIndex. | |
| optionPosition | No | 0-based index into the question's options (or matrixrating rows/columns, per `target`). Provide this OR optionId. | |
| deleteConditionIndex | No | Removes one condition from this entry by index. Mutually exclusive with conditions/visibility/deleteEntry. |