Skip to main content
Glama

update_answer_logic

Destructive

Edit one Answer Logic entry on an answer choice — the per-option (or per-matrix-row/-column) "if / then show" rule that decides whether THAT SPECIFIC choice appears to a respondent. Identify the question with questionId/position, the choice with optionId/optionPosition (for matrixrating, also pass target: "rows" or "columns" first), and the entry with entryIndex (call get_answer_logic first — always 0, since a choice can only ever have one entry). Provide EXACTLY ONE of: conditions and/or visibility together (edits that entry in place — can be combined in one call, matching the builder where both are independently editable on the same entry: conditions replaces the entry's whole condition list, visibility — matrixrating targets only, "show" or "dontShow" — changes whether the row/column shows or hides when the conditions match); deleteConditionIndex (removes one condition — if that empties the entry, the entry is removed too, nothing left dangling); or deleteEntry: true (removes the whole entry; if it was the last entry for this choice, its displayLogics key is removed too). The conditions (replace) path is refused outright (no force override, nothing changed) if a condition's source question comes after the OWNING question (the one this choice belongs to) in the survey. Reorder the questions or pick an earlier source first. visibility on a plain-option (non-matrixrating) target is refused — those choices have no such field at all, matching the builder exactly.

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>",
      "entryIndex": "<entryIndex>"
    },
    "name": "update_answer_logic"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetNoRequired (and ONLY valid) for a matrixrating question — which axis optionId/optionPosition resolves against.
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.
optionIdNoThe option's/row's/column's own id. Provide this OR optionPosition.
positionNo0-based index into the survey's questions array. Provide this OR questionId.
surveyIdYesThe Survey ID containing the question
conditionsNoReplaces this entry's entire condition list. Can be combined with visibility in the same call; mutually exclusive with deleteConditionIndex/deleteEntry.
entryIndexYesWhich Answer Logic entry to edit — call get_answer_logic first to see current indices.
questionIdNoThe question's id. Provide this OR position.
visibilityNoMatrixrating targets only — "show" means show this row/column when the conditions match, "dontShow" means hide it when they match. Can be combined with conditions in the same call; mutually exclusive with deleteConditionIndex/deleteEntry. Refused for a plain-option target.
deleteEntryNotrue to remove the whole entry. Mutually exclusive with conditions/visibility/deleteConditionIndex.
optionPositionNo0-based index into the question's options (or matrixrating rows/columns, per `target`). Provide this OR optionId.
deleteConditionIndexNoRemoves one condition from this entry by index. Mutually exclusive with conditions/visibility/deleteEntry.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare a destructive, non-idempotent write, and the description adds substantial behavior beyond them: deleteConditionIndex that empties an entry also removes the entry, deleteEntry removes the displayLogics key when it was the last entry, and the conditions-replace path is refused outright (nothing changed, no force override) when a source question comes after the owning question. It also discloses that visibility on a plain-option target is refused. These are exactly the consequences an agent needs before mutating.

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-loaded with the resource definition, then the identification chain, then the mutually exclusive operations — a logical order for a 12-parameter tool. It is dense but mostly earns its length, though the repeated "matching the builder" phrasing and some restatement of schema detail could be trimmed.

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 12-parameter destructive mutation with no output schema, the description covers every operation path, the identification requirements, the refusal condition and its remedy, and the cascade effects of deletion. An agent has enough to call it correctly without opening the schema.

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%, so the baseline is 3, but the description adds real meaning: entryIndex is always 0 because a choice can only have one entry, target must be supplied for matrixrating, and conditions/visibility can be combined while the delete paths cannot. It thereby clarifies the interaction rules the per-parameter schema text cannot express.

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 and resource ("Edit one Answer Logic entry on an answer choice") and immediately defines the object in domain terms: the per-option/per-row "if / then show" rule governing whether that specific choice appears. This distinguishes it cleanly from the add/get siblings for answer logic.

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?

Explicitly routes the agent: call get_answer_logic first for the index, then provide EXACTLY ONE of three mutually exclusive paths (conditions/visibility, deleteConditionIndex, deleteEntry). It also names the prerequisite for matrixrating targets (pass `target: "rows"` or `"columns"` first) and states what to do on refusal (reorder questions or pick an earlier source).

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