Skip to main content
Glama

Опрос на сайте: сценарий показа

manage_quiz_site_placement
Destructive

Привязывает опрос на сайте (тип опроса micro, см. create_quiz) к сайту пространства и задаёт, где, когда, кому и как часто его показывать. get — текущая привязка (null — ещё не подключён). save — создать или изменить: меняются только присланные поля display, остальное остаётся (у новой привязки — значения по умолчанию); значения не отклоняются, а приводятся — неизвестное значение перечисления становится значением по умолчанию, число вне границ — ближайшей границей; что сохранилось на самом деле, видно в ответе. Скрипт показывает только опубликованные и принимающие ответы опросы без пароля, входа через SSO и подтверждения почты; обычные опросы не принимаются. Чтение — по доступу к опросу, save — право edit_quiz.

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": {
      "quiz_id": "<quiz_id>",
      "action": "<action>"
    },
    "name": "manage_quiz_site_placement"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesget — текущая привязка; save — создать или изменить.
displayNoДля save: меняемые поля сценария показа. format: card (по умолчанию) | modal. position: bottom-right (по умолчанию), bottom-left, top-right, top-left, middle-left, middle-right, top-center, bottom-center. trigger — когда показать: {type: delay, delay_seconds 0..600} (по умолчанию, 3), {type: scroll, scroll_percent 1..100}, {type: exit} — уход со страницы, {type: event, name} — сайт вызывает open_call из manage_workspace_sites, {type: element, selector} — клик по CSS-селектору, {type: launcher, label до 24 символов, view tab|pill, color, text_color (#rrggbb), icon none|chat|question|envelope|megaphone|star|smile|survey|bulb|gift} — своя кнопка на странице. Триггер того же type дополняется, другого — заменяется. url_rules — на каких страницах: до 20 [{match: contains|not_contains|equals|starts, value}], [] — все страницы. conditions: devices all|desktop|mobile, traffic_share 1..100. frequency: mode once|session|day|week|month|always, stop_after_submit, skip_if_answered (булевы). conditions и frequency дополняются.
quiz_idYesID опроса.
site_idNoДля save: ID сайта из manage_workspace_sites. Обязателен, пока привязки нет; у существующей без него сайт остаётся прежним.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: save is a partial update where only supplied display fields change, new placements receive defaults, invalid enum values are coerced to defaults, out-of-range numbers are clamped, and the response reveals what was actually saved. It also states eligibility requirements and permission rules (read via quiz access, save via edit_quiz), which are critical for safe invocation. The destructiveHint=true annotation is consistent with a tool that modifies site placement.

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 dense but front-loaded, starting with the core purpose before moving into action semantics, coercion rules, eligibility, and permissions. It avoids filler, though the semicolon-heavy structure and number of clauses in one paragraph make it slightly harder to scan than it could be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool with nested parameters and no output schema, the description covers the important operational details: partial updates, coercion behavior, eligibility constraints, permissions, and the fact that the response shows actual saved state. It could go further in describing the exact shape of get/save responses, but it provides enough for correct invocation.

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

Parameters3/5

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

Schema description coverage is already 100%, so the input schema fully documents quiz_id, site_id, action, and the nested display object. The description reinforces the partial-update semantics for display and site_id, but most parameter-level meaning is already present in the schema. A baseline score of 3 is appropriate because the schema is doing the heavy lifting.

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 precise verb and resource: it attaches a micro-type quiz to a workspace site and defines its display scenario. It explicitly splits behavior into get (retrieve current placement) and save (create or modify), and it distinguishes this tool from create_quiz and manage_workspace_sites by naming them as related tools.

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?

The get/save actions are clearly explained, including that get returns null when no placement exists and save handles both creation and modification. Eligibility constraints are also given: only published quizzes accepting answers without password, SSO, or email confirmation can be shown, and regular quizzes are rejected. It does not explicitly compare this tool to other placement-related alternatives, but the context is otherwise clear.

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