Skip to main content
Glama

get_answer_logic

Read-onlyIdempotent

Read one answer choice's Answer Logic — the per-option (or per-matrix-row/-column) "if / then show" rule that decides whether THAT SPECIFIC choice appears to a respondent, based on an earlier answer. This is the SAME displayLogics map question/submit Display Logic uses, just keyed by the option's/row's/column's own id instead of a question's id. This is NOT Jump/Skip Logic (that's get_jump_logic) — there is no "jump to a question"/"end survey" action anywhere in this data; the only possible outcome is showing (or, matrix only, showing/hiding) this one choice. A separate builder feature only available on multiplechoice, checkboxes, dropdown, colorpicker, multiplenumber, multipletext, ranking, and matrixrating questions. Identify the question with questionId or position, then the choice with optionId or optionPosition — for a matrixrating question, also pass target: "rows" or "columns" first to say which axis it belongs to (required for matrix, rejected for every other type). Read-only. hasAnswerLogic: false with an empty entries array if there's none. Each entry's visibility ("show" or "dontShow") is only present for a matrixrating target — a plain option's Answer Logic always means "show this option when the conditions match," full stop, matching question-level Display Logic's own fixed semantics; matrix rows/columns can instead mean "don't show it when they match." When describing this to the end user, describe conditions in plain English — never quote raw field names like qid/conidition/entryIndex verbatim. Before stating whether a choice currently HAS Answer Logic, or what it contains, call this tool fresh and read its result — never assert this from memory of an earlier call in this conversation, including your own earlier edits; the survey may have changed since then, including edits you made yourself.

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>"
    },
    "name": "get_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
questionIdNoThe question's id, as seen in get_survey_details's output
optionPositionNo0-based index into the question's options (or matrixrating rows/columns, per `target`). Provide this OR optionId.

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 already declare readOnly/idempotent/non-destructive, yet the description adds far more: the supported question-type list, the fact that the data mirrors the `displayLogics` map, the return shape (`hasAnswerLogic: false` with empty `entries`), the `visibility` field only existing for matrixrating targets, and the fixed "show" semantics for plain options. The staleness warning about re-calling after one's own edits is exactly the kind of context annotations cannot convey.

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 definition first, then exclusions, then parameter routing, then output semantics, then a usage caveat — a sensible ordering. It is dense and long, with some sentences packing several clauses and parentheticals, and it partially repeats schema-stated parameter alternatives, but little is genuinely wasted.

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?

No output schema exists, so the description carries the return-value burden and does so: `hasAnswerLogic`, `entries`, and conditional `visibility`. Combined with supported question types, matrix axis handling, and the re-read requirement, an agent has everything needed to call this correctly and interpret results.

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% and the schema descriptions already state the 'provide this OR that' relationships and the matrixrating restriction, so the description largely echoes structured data. It does add value by enumerating which question types support the feature (multiplechoice, checkboxes, dropdown, matrixrating, etc.), clarifying the domain context for `target` and the option/row/column ambiguity.

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 opening sentence gives a specific verb ('Read') plus a precise resource ('one answer choice's Answer Logic') and defines it as the per-option "if / then show" rule. It goes further by naming what it is NOT (Jump/Skip Logic, get_jump_logic) and contrasting with question-level Display Logic, so an agent can distinguish it from all nearby siblings without opening a schema.

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?

Explicit routing guidance: identify the question with `questionId` or `position`, the choice with `optionId` or `optionPosition`, and pass `target` first for matrixrating (required there, rejected elsewhere). It also names the excluded case (no jump/end-survey action) and instructs the agent to call fresh rather than rely on memory of earlier edits.

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