Skip to main content
Glama

Add Display Logic Rule

add_display_logic_rule

Adds a display-logic rule to a survey: SHOW or HIDE a target question depending on answers to EARLIER questions. Every condition's source question must come strictly before the target in question order (same page above it is fine) — a later source is an explicit error. conditions take the source question's variable code (Q1, Q2, … from get_survey), an operator (equals, not_equals, is_selected, is_not_selected, greater, greater_or_equal, less, less_or_equal, contains, not_contains, is_empty, is_not_empty, was_displayed, matches_regex) and a value: for choice questions the option's numeric code as get_survey reports it, for text/number questions a literal (no value for is_empty/is_not_empty/was_displayed). match=all (AND, default) or any (OR) combines multiple conditions. Verified by readback: the reply is the rule as actually stored in the survey. Requires the edit-survey right.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesSurvey publication code — the 8-character code from the survey's public link (e.g. 1a2b3c4d). Returned by list_surveys.
matchNoHow multiple conditions combine: all (AND, default) or any (OR).all
actionYesWhat happens when the conditions match: show or hide the target question.
questionYesVariable code of the TARGET question to show or hide (Q1, Q2, … from get_survey).
conditionsYesThe conditions (1 or more); each source question must come before the target.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageNoWhat the call did, verified, refused or previewed — the complete human-readable outcome.
previewNotrue when the call was a preview (confirm not passed): nothing was changed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare the generic mutation profile (readOnly=false, destructive=false, idempotent=false). The description adds substantive context: the reply is verified by readback and returns the rule as actually stored, plus the auth requirement and the explicit ordering error. That is real value beyond the annotations.

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 the purpose, then packs constraints and parameter detail into one dense paragraph with no filler. It is long and somewhat run-on, but nearly every clause carries operational weight.

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?

Covers the ordering invariant, auth requirement, operator set, value formats, match modes, and verification behavior. With an output schema present, no return-value detail is needed. Nothing an agent needs to invoke 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%, but the schema's condition sub-fields are undocumented. The description supplies the full operator vocabulary, the value convention (numeric option code for choice questions, literal for text/number, omitted for is_empty/is_not_empty/was_displayed), and confirms match semantics. It clearly adds meaning beyond the schema.

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+resource ('Adds a display-logic rule to a survey') and immediately defines the scope as SHOW/HIDE of a target question based on earlier answers. This distinguishes it from the sibling add_jump_logic_rule (which routes rather than reveals/hides).

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

Usage Guidelines4/5

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

Gives strong conditions for correct use: source questions must come strictly before the target (a later source is an explicit error), and the edit-survey right is required. It does not, however, explicitly contrast when to choose this over add_jump_logic_rule, leaving that discrimination 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.

Resources