Delete Question
delete_questionDeletes a question from a survey. Collected answers are keyed to a stable internal code per question, so the data of the other questions is unaffected. What changes: (1) the deleted question's own answers are deleted with it; (2) the positional variable names Q{n} of every later question shift (Q5 becomes Q4, ...) — addressing only; get_survey returns the new names, and custom IDs keep a stable name across edits; (3) logic rules that reference the deleted question break; get_survey lists them in logic.errors until they are deleted or redefined (add_display_logic_rule / add_jump_logic_rule). Called without confirm the tool returns a preview with the response count, the dependent logic rules and the remaining question count and changes nothing; confirm:true performs the delete. The delete is verified server-side by re-reading the survey. Requires the edit-survey right.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Survey publication code — the 8-character code from the survey's public link (e.g. 1a2b3c4d). Returned by list_surveys. | |
| confirm | No | Omit or false → read-only preview of the consequences, NO change is made. true → actually delete (only after the user explicitly agreed). | |
| question | Yes | Variable code of the question to delete (Q1, Q2, … from get_survey, or its custom ID). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | No | What the call did, verified, refused or previewed — the complete human-readable outcome. | |
| preview | No | true when the call was a preview (confirm not passed): nothing was changed. |