import_gift
Import GIFT-formatted questions into a Moodle quiz, creating them in a bank category and appending to quiz slots. Idempotent to avoid duplicates.
Instructions
Import GIFT-formatted questions into a quiz. Creates the questions in a bank category and appends them to the quiz slots by default. Idempotent (plugin dedupes by question name within the category).
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": {
"course_id": "<course_id>",
"quiz_slug": "<quiz_slug>",
"gift_text": "<gift_text>"
},
"name": "import_gift"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| append | No | If true, append to quiz slots. If false, only create in bank without attaching. | |
| course_id | Yes | ||
| gift_text | Yes | Full GIFT-format text block with one or more questions. | |
| quiz_slug | Yes | Slug that identifies the target quiz (same used in configure_quiz). | |
| category_name | No | Question bank category to drop the questions in. Defaults to the quiz name. |