add_jump_logic
Add Jump Logic to a question — the "Then Jump To" rules in the builder's Logic tab that send the respondent to a different question (or end the survey) based on an earlier answer. This is NOT Display Logic (that's add_display_logic — controls whether a question is SHOWN at all, never where the respondent goes next) and NOT Answer Logic (that's add_answer_logic — controls whether one specific answer choice is shown, also never a destination). The only outcome here is routing: which question (or "end") comes next. Two independent modes, exactly one per call: (1) entry mode — skipTo (a question id or the literal string "end") + conditions (1+) adds a new jump-logic entry (unlike Display Logic, a question can have MANY entries — omit insertAfterEntryIndex to append, or set it to control where the new entry lands, -1 = start, N = right after entry N); provide entryIndex instead of skipTo to append the given condition(s) to an EXISTING entry's condition list instead (use insertAfterConditionIndex to control position within it). (2) defaultJumpTo mode — set defaultJumpTo (a question id or "end") instead of skipTo/conditions/entryIndex to set the question's unconditional fallback target (used when no jump-logic rule matches, or when there are none at all) — no conditions involved. This mode REPLACES any existing default jump target on the question without warning, so check get_jump_logic first if the user might already have one. A condition's source question can be the OWNING question itself (checking the answer just given — the common case) or any EARLIER question, but never a later one — refused outright (no force override) if it is, since jump logic evaluates right after the owning question is answered. Creating a question's FIRST jump-logic entry, or setting defaultJumpTo for the first time while it has neither entries nor an existing default, auto-disables Question Randomization if it was on (matches the builder's own side effect) — check randomizationDisabled in the result. Questions ONLY — not welcome/thank-you screens (get_thankyou_screen_logic) or the submit screen. The submit screen does have its OWN entry in this same logics map, but for a different feature entirely — a conditional URL redirect after submission (redirectTo, not skipTo) — which this tool does not support; there is currently no MCP tool for it.
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>"
},
"name": "add_jump_logic"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| skipTo | No | Entry mode, creating a NEW entry: the jump target — another question's id, or the literal string "end" to end the survey. Required when entryIndex is omitted; ignored if entryIndex is provided (that entry's skipTo is already set — change it via update_jump_logic). | |
| 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. | |
| position | No | 0-based position of the question. Provide this OR questionId. | |
| surveyId | Yes | The Survey ID containing the question | |
| conditions | No | Entry mode only, required (1+) — the condition(s) for the new entry, or to append to an existing one. | |
| entryIndex | No | Entry mode, appending to an EXISTING entry instead of creating one: which entry (from get_jump_logic) to append the given condition(s) to. Omit (and provide skipTo) to create a new entry instead. | |
| questionId | No | The question this jump logic belongs to. Provide this OR position. | |
| defaultJumpTo | No | defaultJumpTo mode instead of entry mode: sets the question's unconditional fallback jump target (a question id, or "end") — used when no jump-logic rule matches, or when there are none. Must be non-empty here; to clear an existing one, use update_jump_logic with defaultJumpTo: "". | |
| insertAfterEntryIndex | No | Only with a new entry (entryIndex omitted): where the new entry lands among existing ones. -1 = start, N = right after entry N. Omit to append at the end. | |
| insertAfterConditionIndex | No | Only with entryIndex (appending to an existing entry): where the new condition(s) land within that entry's condition list. -1 inserts at the start, N inserts right after condition N. Omit to append at the end. |