Skip to main content
Glama

add_thankyou_screen_logic

Add Display Logic to a thank-you screen — the builder's own label for it, even though it's the same survey.logics map as question-level Jump Logic, keyed by the screen's id. This is what selects WHICH thank-you screen a respondent sees when a survey has more than one: the first screen whose entry conditions evaluate true wins, or the first screen with no logic entries at all. Despite sharing a map with Jump Logic, there is NO "jump to a question" action here — skipTo isn't even a parameter on this tool, and has no effect for a screen even where it technically exists on old data. The only two effects are (1) screen selection (which entry's conditions determine this screen gets shown) and (2), optionally, assigning a text variable. Identify the screen with screenId or position (omit both for position 0). Omit entryIndex to create a new entry (a screen can have MANY, unlike question/submit Display Logic's one-entry limit) — position it with insertAfterEntryIndex (-1 = start, N = right after entry N, omit = append). Provide entryIndex instead to append the given condition(s) to an EXISTING entry (position within it via insertAfterConditionIndex). Optionally, when creating a NEW entry, variable + variableValue sets that entry's "Assign to text variable" — a real, functional side-effect applied when the entry's conditions match (use update_thankyou_screen_logic to add/change one on an entry that already exists). This only assigns a FIXED value to a variable that ALREADY EXISTS — it cannot create a new variable (refused if variable isn't a recognized name) and cannot capture/recall a respondent's actual answer into it (refused if variableValue contains recall/piping syntax) — see those two fields' own descriptions. No ordering restriction on a condition's source question — thank-you screens only evaluate once the whole survey is complete, so every question is always a valid source. No confirmation/force gate — purely additive.

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>",
      "conditions": "<conditions>"
    },
    "name": "add_thankyou_screen_logic"
  }
}

Input Schema

NameRequiredDescriptionDefault
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 index into thankyouScreens[]. Provide this OR screenId. Omit both for position 0.
screenIdNoThe thank-you screen's id. Provide this OR position.
surveyIdYesThe Survey ID containing the thank-you screen
variableNoOnly applied when creating a NEW entry — assigns this survey variable when the entry's conditions match. Must be the name of a variable that ALREADY EXISTS in the survey's variable list (including the reserved defaults ref/source/medium/result/responseID, or one created via the builder's Settings → Variables) — this tool cannot create a new one, and an unrecognized name is refused. Pair with variableValue.
conditionsYesThe condition(s) for the new entry, or to append to an existing one.
entryIndexNoAppend to an EXISTING entry instead of creating one: which entry (from get_thankyou_screen_logic). Omit to create a new entry.
variableValueNoThe FIXED value assigned to `variable` when the entry's conditions match — stored and shown exactly as typed, never resolved for recall. Do NOT put `{{prefix:id}}` recall/piping syntax in here expecting it to capture a respondent's actual answer — it will not work, and is refused outright. Only meaningful together with variable.
insertAfterEntryIndexNoOnly with a new entry (entryIndex omitted): where it lands among existing entries. -1 = start, N = right after entry N. Omit to append at the end.
insertAfterConditionIndexNoOnly with entryIndex: where the new condition(s) land within that entry's list. -1 = start, N = right after condition N. Omit to append at the end.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations declaring a non-readonly, non-idempotent, non-destructive, open-world operation, the description discloses additive behavior with no confirmation gate, the first-true-screen selection rule, multiple possible entries per screen, and side effects when variable and variableValue match conditions. It also documents refusal cases for unrecognized variables and recall/piping syntax.

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?

The description is front-loaded with the core purpose and the key Jump Logic distinction, and most sentences carry operational detail. It is dense and written as one long paragraph, with some repetition around variable assignment limits, so it loses a point for structure and verbosity despite being information-rich.

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 the selection model, entry and condition insertion behavior, variable assignment side effects and refusals, ordering restrictions, and sibling-tool handoff to update_thankyou_screen_logic. An agent has enough context to invoke it correctly.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds important cross-parameter behavior: screenId versus position with position 0 default, entryIndex to append versus omission to create, insertAfterEntryIndex and insertAfterConditionIndex placement rules, and variable/variableValue applicability only when creating a new entry. It also explains that conditions append to an existing entry or form a new one.

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?

The description states a specific verb and resource: adding Display Logic to a thank-you screen. It also distinguishes this from question-level Jump Logic and explains that the logic selects which thank-you screen a respondent sees, so an agent can tell it apart from sibling logic tools.

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?

It explains the selection behavior when a survey has multiple thank-you screens, creation versus append semantics via entryIndex, and names update_thankyou_screen_logic for changing variables on an existing entry. It also clarifies when NOT to expect jump-to-question behavior, because skipTo is absent and has no effect.

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