Update question
moodle_update_questionEdit an existing Moodle question by changing only the fields you specify; updates are saved as a new version, with answer lists replaced or true/false correctness set.
Instructions
Edits an existing question (Moodle saves it as a new version). Only the given fields change. "answers" replaces the whole answer list (multichoice/shortanswer/numerical); "correct" is for truefalse.
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": {
"question_id": "<question_id>"
},
"name": "moodle_update_question"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmid | No | Quiz cmid: use the quiz's own question bank instead of the course one | |
| name | No | ||
| text | No | ||
| single | No | ||
| status | No | ||
| answers | No | ||
| correct | No | ||
| courseid | No | Course id: use the course question bank | |
| idnumber | No | ||
| raw_fields | No | Advanced: raw question form fields to override | |
| defaultmark | No | ||
| question_id | Yes | ||
| shuffleanswers | No | ||
| generalfeedback | No |