Set question logic

Hide a question when conditions are met, or always.

MCP tool fillout_write → set_question_logic

write

Sets the Logic of one question: hide_when conditions on earlier answers or URL parameters, or hide_always for a field that only carries a pre-filled value. It replaces the conditions the question had. Conditions that depend on integration data are not set by this tool. The change reaches respondents only after publish_form, and it is undone by the editor's edit history, so it runs without asking first.

Parameters

Parameters: set_question_logic
NameTypeDescription
form_id string required string Form ID from list_forms.
question_id string required string Question ID from get_form.
hide_when array array Conditions as in the editor's Add condition. Each item: source (answer or url_parameter), question_id or name, operator (as the condition editor offers it for that field), value.
hide_always boolean boolean Always hide the question. Default: false.

tools/call

JSON-RPC

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "fillout_write",
    "arguments": {
      "operation": "set_question_logic",
      "arguments": {
        "form_id": "rK8mTn4vYb1C",
        "question_id": "q_org_description",
        "hide_when": [
          {
            "source": "answer",
            "question_id": "q_company_type",
            "operator": "is not",
            "value": "Non-profit"
          }
        ]
      }
    }
  }
}

Example response

JSON

{
  "content": [
    {
      "type": "text",
      "text": "{ ... same JSON as structuredContent ... }"
    }
  ],
  "structuredContent": {
    "form_id": "rK8mTn4vYb1C",
    "question_id": "q_org_description",
    "hide_always": false,
    "hide_when": [
      {
        "source": "answer",
        "question_id": "q_company_type",
        "operator": "is not",
        "value": "Non-profit"
      }
    ]
  },
  "isError": false
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.