Get Survey Structure
get_surveyReturns the survey structure for a survey code: questions with their variable names (Q1, Q2.3 for a checkbox option, Q), question texts, types and answer options with numeric codes, plus the page layout: each question carries page (1-based) and pageTitle, and pages lists every page in order (number, title, questionCount, isEnd, marksComplete) INCLUDING pages that are still empty. logic lists the survey's stored rules in the authoring vocabulary — display rules (target question, show|hide, match, conditions) and jumps (source question, operator, value, target page number or 'end') — audit them before adding new ones; logic.errors lists BROKEN rules (their source question/option or target page was deleted) — each needs the user's decision: delete the rule block or redefine it. languages lists the survey's default language and every configure_survey_language layer (code, own name, direction, isDefault, translated/fallback key counts). archived:true means the survey sits in the recoverable bin (it is hidden from list_surveys; the user restores it in the app). Use the variable names to interpret responses and address answers when creating or updating a result case; use the page layout to place questions (add_question's page) and to plan branching (a branching source must sit on an earlier page than its targets). This structure is also the key to interpreting raw responses from list_survey_responses when you run your own analysis. shareURL is the canonical link respondents open and previewURL opens the survey in test mode (nothing is stored) - these are the canonical survey URLs; a survey URL assembled from other parts is not a supported link.
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>"
},
"name": "get_survey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Survey publication code — the 8-character code from the survey's public link (e.g. 1a2b3c4d), as returned by list_surveys. A survey ID (the GUID 'ID' from list_surveys) is accepted too and is resolved to that survey's code. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| code | No | ||
| name | No | ||
| logic | No | ||
| pages | No | ||
| archived | No | ||
| metaType | No | ||
| shareURL | No | ||
| languages | No | ||
| questions | No | ||
| deleteDate | No | ||
| previewURL | No | ||
| surveyState | No | ||
| creationDate | No | ||
| lastChangedDate | No |