Add Question
add_questionAdds a question to a survey and returns its variable code (Q1, Q2, …). title is the question text. type is a structural key of the form family.modifier[.variant]. Supported (creatable) keys: instruction.default; single-choice.default, single-choice.column-left-label, single-choice.row, single-choice.rows, single-choice.columns, single-choice.row.button (a 0–10 NPS scale); multi-choice.default, multi-choice.column-left-label, multi-choice.row, multi-choice.rows, multi-choice.columns; text-input.single-line, text-input.single-line.number, text-input.single-line.email, text-input.multiline, text-input.form, text-input.form.constant-sum; matrix.simple, matrix.simple.checkbox, matrix.simple.bulky-text, matrix.side-by-side, matrix.bipolar; dropdown.default; sliders.sliders, sliders.ratings, sliders.emotions, sliders.gradient-sliders, sliders.balks, sliders.sliders.constant-sum, sliders.ratings.constant-sum; sorting.rank-order, sorting.rank-assignment; code.default. requireType is none | soft | strict (default: leave the type's own setting). Fields apply by presence: options[] (label, optional code, hasCustomField for an 'other' field, isExclusive for checkbox) fill choice options / matrix or scale columns; rows[] fill matrix statements; scale{min,max} sets numeric/slider bounds; customID sets an author id. Anything omitted keeps the type's own default (e.g. an nps/single-choice.row.button question keeps its 0–10 scale and anchor labels). For choice, dropdown, sorting and matrix types always pass your own options[] (and rows[] for matrices) — omitting them leaves the seed's generic placeholder options. page places the question on a specific page (1-based, the numbering add_survey_page and get_survey report); omitted, the question is appended to the LAST page. add_question never creates pages — create them with add_survey_page first, a non-existent number is an error. Show/skip logic fires on the move between pages: a branching source question takes effect only on questions placed on a later, separate page; a condition and its targets on the same page cannot work. These types must be set up in the QUESTIONSTAR UI and return an error here: autocomplete.single-answer, autocomplete.multiple-answers, heatmap.default, file-upload.default, signature.default. Verified by readback: the survey is re-read through get_survey and the reply reports the question as actually stored, including the page it landed on. Requires the edit-survey right on this survey.
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": {
"code": "<code>",
"type": "<type>",
"title": "<title>"
},
"name": "add_question"
}
}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. | |
| page | No | 1-based page number to place the question on. Omit → appended to the LAST page. A page number that does not exist is an error — create the page with add_survey_page first. | |
| rows | No | Matrix row statements. Applied when the type has a statement list; otherwise ignored. | |
| type | Yes | Question type — a structural key such as single-choice.default, text-input.single-line.number or single-choice.row.button (see the tool description for the full supported set). | |
| scale | No | Numeric/slider bounds {min,max}. Applied when the type carries a range; otherwise ignored. | |
| title | Yes | Question text. | |
| options | No | Answer options (choice types) or scale/matrix columns. Applied when the type has an option list; otherwise ignored. | |
| customID | No | Optional author-defined custom id for the question. | |
| requireType | No | Answer requirement. Omit to keep the type's default. |
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. |