Skip to main content
Glama

Display Logic Rule Create

display_logic_rule_create

Add one condition to a display logic group (draft surveys only); the group's 'and'/'or' combines its rules. displayLogicGroupId comes from display_logic_list or display_logic_container_create. Conditions by source question type: multiple_choice, dropdown, ranking, constant_sum: is_selected_option with { idx } (0-based index into answer_options, or "none" / "other"). opinion_scale, slider, rating, numeric: is_number_less, is_number_greater, is_number_equal_to, is_number_not_equal_to with { value: number }. date: is_date_on, is_date_not_on, is_date_before, is_date_later with { date: "YYYY-MM-DD" }. matrix: is_matrix_selected with { rowIdx, colIdx } (0-based). short_text, long_text: is, is_not (AI meaning match) with { value }. short_text, long_text, email, phone_number, website: string_contains, string_does_not_contain, is_string_equal_to, is_string_not_equal_to, string_begins_with, string_ends_with with {}, then set the text with display_logic_rule_update_text. URL parameter sources: is, is_not with { value: "" }. A decision question cannot be a source. The target question shows when its logic matches and is hidden otherwise. A URL parameter must be declared type "enum_" and the value must be one of its enumValues.

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": {
      "displayLogicGroupId": "<displayLogicGroupId>",
      "surveyId": "<surveyId>",
      "ruleCondition": "<ruleCondition>",
      "args": "<args>"
    },
    "name": "display_logic_rule_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsYesArguments for the rule. Answer-sourced e.g. {value: "yes"}, {idx: 0} for the first option, {value: 9}, {date: "2024-01-01"}, {rowIdx: 0, colIdx: 1}. URL-param-sourced: {value: "<enum value>"}.
surveyIdYesThe survey ID
ruleConditionYesType of comparison. For url-param-sourced groups only "is"/"is_not" are valid. is_number_euqal_to and is_number_not_euqal_to are older spellings of is_number_equal_to and is_number_not_equal_to.
displayLogicGroupIdYesGroup ID to add rule to

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

The annotations already indicate a non-readonly, non-idempotent, non-destructive mutation, and the description adds substantial behavioral context beyond them. It discloses the draft-only constraint, how the group's and/or combines rules, and that the target question shows when logic matches and is hidden otherwise.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is long but dense and front-loaded, with the core action and scope stated first. Every section adds necessary condition-selection, argument-shape, or source-type guidance for a complex domain, with no obvious filler.

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?

Given the complexity, 100% schema coverage, annotations, and existing output schema, the description is complete enough for correct invocation. It covers prerequisites, constraints, source-type mappings, argument formats, and relevant follow-up behavior.

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%, so the baseline is 3, but the description adds extensive meaning beyond the schema. It maps ruleCondition values to source question types, describes args shapes such as {idx}, {value}, {date}, and {rowIdx, colIdx}, notes 0-based indexing, and constrains URL-param rules to enum-typed parameters.

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 gives a specific verb and resource: "Add one condition to a display logic group," with the important scope restriction "draft surveys only." It is clearly distinguishable from sibling tools such as display_logic_rule_update and display_logic_rule_update_text.

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 states when the tool applies (draft surveys only), where displayLogicGroupId comes from (display_logic_list or display_logic_container_create), and how source question type determines valid conditions. It also gives explicit exclusions and follow-up guidance, including that decision questions cannot be sources and text values require display_logic_rule_update_text.

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