Question Reorder
question_reorderMove a question to a new position or between groups. Read the survey with survey_get first for positions and versions.current (pass it as surveyVersion); the result returns the next one. Changes a published survey at once.
IMPORTANT: Indices are based on the "formatted structure" where:
Root-level items and groups are sorted by order
Items inside groups are not counted in the root index
When moving FROM root level (no surveyItemGroupIdFrom):
orderIndexFrom = array index in the formatted structure (0, 1, 2...)
Groups count as 1 item at their position
When moving FROM a group (with surveyItemGroupIdFrom):
orderIndexFrom = index within that group's items (0, 1, 2...)
When moving TO root level (no surveyItemGroupIdTo):
orderIndexTo = target position in root level
When moving TO a group (with surveyItemGroupIdTo):
orderIndexTo = target position within that group's items
Example: To move item at root index 2 into a group at position 0:
orderIndexFrom: 2
orderIndexTo: 0
surveyItemGroupIdTo: "group-uuid"
Example: To move item from group position 1 back to root at index 0:
orderIndexFrom: 1
surveyItemGroupIdFrom: "group-uuid"
orderIndexTo: 0
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>",
"surveyVersion": "<surveyVersion>",
"orderIndexFrom": "<orderIndexFrom>",
"orderIndexTo": "<orderIndexTo>"
},
"name": "question_reorder"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| surveyId | Yes | Survey ID (from survey_list) | |
| orderIndexTo | Yes | Target position (array index at root level, or index within target group) | |
| surveyVersion | Yes | Current survey version: versions.current from survey_get, or the surveyVersion your last edit returned. A stale version is rejected (WRONG_VERSION). The result returns the next one as surveyVersion. | |
| orderIndexFrom | Yes | Source position (array index at root level, or index within source group) | |
| surveyItemGroupIdTo | No | Target group ID (omit when moving to root level) | |
| surveyItemGroupIdFrom | No | Source group ID (omit when moving from root level) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |