Skip to main content
Glama

Логика переходов опроса

update_quiz_logic

Сохраняет логические условия опроса: условные переходы между виджетами, переходы по умолчанию, логику по баллам (score). Новый формат: score-правила идут в savedLogic как обычные группы с condition.score=true; legacy savedScoring сохраняется только для backward compatibility. group.actionType ∈ {"jump","screenout","show","hide"} ("show"/"hide" — логика видимости: jumpTo указывает виджет, который показывается или скрывается, а не следующий шаг маршрута; дополнительные цели — в visibilityActions). defaultConditions разрежен: запись нужна только там, где переход отличается от следующего вопроса по порядку. Все идентификаторы виджетов (widget_id, widgetId, jumpTo и т.д.) — те же уникальные UUID, что в quiz://{id}/structure (поле ids или ids внутри child-элементов inline_group). Перед вызовом прочитайте quiz://{id}/structure и используйте id без изменений. Обновление частичное: переданная карта заменяет одноимённую целиком (пустой объект очищает её), не переданные карты остаются как были. Служебные ключи conditions ведёт бэкенд: isQuota выводится из наличия групп дисквалификации по квоте, defaultConditionsVersion=2 проставляется при передаче defaultConditions — присылать их не нужно и нельзя. Валидация: проверка существования виджетов, корректности операторов, отсутствия циклов и тупиков в маршруте. Блокируют сохранение также противоречивые действия внутри одной группы: показ и скрытие одного вопроса, переход на вопрос, который эта же группа скрывает, и изменение видимости уже пройденного вопроса. В поле warnings возвращаются переходы назад, вопросы без входящих путей, правила-дубли перехода по умолчанию, условия по ответу вопроса ниже по порядку, порядок carry-forward и риски случайной сортировки вопросов — сохранению они не мешают.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
quiz_idYesID опроса для обновления логики.
savedLogicNoГруппы условий переходов по widget_id (включая score-правила: condition.score=true, операторы 1/2/7/8/9/10, answer.optionId — порог totalScore). group.actionType: "jump" или "screenout". Источник баллов — пара condition.scoreSourceType ("survey" | "widget") и condition.scoreSourceWidgetId (UUID при "widget", null при "survey"). Отсутствие обоих полей = legacy "survey". Для условий на allocation_slider передайте allocationData.optionId — UUID из allocationSliderIds виджета; runtime сравнит значение этой опции с answer.optionId.
savedScoringNoLegacy-формат переходов по scoring (для backward compatibility). По ключам widget_id — объекты scoreConditionId→{score,jumpTo,inCase,inCaseMeaning}. Глобальные ключи: scoringEnabledWidgets, correctAnswers, scoringSwitcher. Для нового контента используйте savedLogic + score:true.
multiLogicFlagsNoФлаги мульти-логики: {widget_id: boolean}.
defaultConditionsNoПереходы по умолчанию по widget_id.
savedInlineGroupLogicNoПоказ и скрытие вопросов внутри inline-группы, по widget_id самой группы: [{ conditionGroupId, actions: [{action: "show"|"hide", targetWidget: {widgetId}}], conditionsData: [...] }]. Без actionType и jumpTo — маршрута внутри группы нет.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare a non-read-only, non-idempotent mutation, but the description adds far more: partial-update semantics (a passed map replaces the same-named map wholesale, an empty object clears it, unpassed maps persist), backend-managed keys (isQuota, defaultConditionsVersion) that must not be sent, validation rules (widget existence, operator validity, cycle/dead-end detection), blocked cases, and the warnings returned without blocking the save.

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?

Length is justified by a genuinely complex nested payload, and the purpose is front-loaded before the format, ID, update-semantics, validation, and warnings detail. The cost is structure: everything is crammed into one dense paragraph spanning several distinct topics, which hurts scannability.

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 six-parameter mutation tool with deeply nested objects and no output schema, the description supplies the missing return behavior (the warnings field), the format migration story, the ID contract, and the validation/blocking rules. An agent has enough to build a valid call and predict the outcome.

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?

Though schema coverage is 100%, the description adds meaning the schema cannot convey: group.actionType show/hide is visibility logic where jumpTo names the shown/hidden widget rather than the route step, defaultConditions is sparse, and score rules belong in savedLogic as ordinary groups with condition.score=true. These are genuine semantic clarifications beyond the field definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: it saves quiz logic conditions — conditional widget transitions, default transitions, and score logic — and distinguishes the new savedLogic format from the legacy savedScoring path. The scope is unambiguous. It does not, however, explicitly contrast itself with siblings such as update_quiz_widgets or update_quiz_settings, leaving the boundary to inference.

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?

It gives concrete workflow guidance: read quiz://{id}/structure first and reuse widget UUIDs unchanged, and use savedLogic + score:true for new content rather than legacy savedScoring. This is real operational context. It stops short of stating when to prefer this tool over adjacent update_* tools or any 'when not to use' exclusion.

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