Skip to main content
Glama

add_jump_logic

Destructive

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

NameRequiredDescriptionDefault
skipToNoEntry 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).
teamIdNoWhich 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.
positionNo0-based position of the question. Provide this OR questionId.
surveyIdYesThe Survey ID containing the question
conditionsNoEntry mode only, required (1+) — the condition(s) for the new entry, or to append to an existing one.
entryIndexNoEntry 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.
questionIdNoThe question this jump logic belongs to. Provide this OR position.
defaultJumpToNodefaultJumpTo 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: "".
insertAfterEntryIndexNoOnly 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.
insertAfterConditionIndexNoOnly 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Goes well past the destructiveHint=true / idempotentHint=false annotations: it discloses that defaultJumpTo silently replaces an existing target, that entry mode appends rather than replaces (many entries allowed), that a later-question source is refused outright with no force override, and that randomization may be auto-disabled with a randomizationDisabled flag in the result. Return shape itself is only alluded to, which keeps it off 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.

Conciseness4/5

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

Front-loads identity and sibling exclusions before the modes, which is the right order, but the single dense paragraph packs a lot of clause-heavy sentences and could be split into short labeled mode blocks for faster scanning. Little is genuinely wasted, so it stays a 4.

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 10-parameter mutation tool with no output schema, the description covers mode selection, positioning, validation limits, side effects, and cross-tool handoffs. Nothing an agent needs in order to call it correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description earns credit for explaining the mode partition (skipTo+conditions vs entryIndex vs defaultJumpTo), that skipTo is ignored when entryIndex is given, and how insertAfterEntryIndex / insertAfterConditionIndex position new items (-1 = start, N = after N). Adds decision-level meaning the schema fields state individually but not jointly.

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 specific verb and resource ('Add Jump Logic to a question — the "Then Jump To" rules') and immediately contrasts it with add_display_logic and add_answer_logic by explaining the different outcome each controls. An agent can pick the right tool without opening any schema.

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?

Names both operating modes and the rule that exactly one applies per call, tells the agent to call get_jump_logic first when a default jump may already exist, and points to update_jump_logic for changing an existing entry's target or clearing a default. Exclusions (welcome/thank-you screens, submit-screen redirect) are stated outright.

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.

Resources