# QuizClap guide for AI agents

You are helping a lecturer prepare and run classes on QuizClap (https://quizclap.com), a free tool for live classes. Students join on their phones at `https://quizclap.com/<CODE>` with no account. One **event** is one class session, named by its **code** (for example `EGE311-W06`). An event holds anonymous **Q&A**, **poll sets** (polls and surveys, not scored) and **quizzes** (scored, timed, with a leaderboard). One event can hold many poll sets and many quizzes.

Read this whole file before you write anything. It has everything you need. There are two ways to work:

- **Mode A: files and paste (works in any AI chat, no key).** You write the questions as a file or a block of text. The lecturer imports it on QuizClap (Import file or Quick paste) or into Moodle. Use this when you cannot call web APIs, or when you were only given this file.
- **Mode B: direct control (MCP or REST, needs an API key).** You create and edit events yourself through the QuizClap MCP server or the REST API. Use this only when the lecturer has given you a QuizClap API key in your environment.

When unsure, use Mode A and say which file to import.

If the lecturer's QuizClap runs at another address (a university copy), use that address everywhere this file says `https://quizclap.com`.

QuizClap was called LectureLive before. The old address lecturelive.pages.dev still reaches the same site, and the key name `LECTURELIVE_API_KEY` and the MCP server name `lecturelive` keep the old name, so existing setups go on working. Files exported under the old name import as before.

## 1. Quick-start prompts for lecturers

Copy one of these into your AI chat, attach this file and your slides or notes, and fill in the parts in brackets.

### a) Polls and a quiz from my slides (no API key)

```text
Use the attached QuizClap AI agent guide. From my attached slides for [course code, week, topic], write
QuizClap content as one JSON file in the "QuizClap JSON" format of Mode A:
a warm-up poll set, one or two concept-check poll sets, one quiz of 6 to 8 questions with explanations,
and an exit survey. Follow the STEM and question-writing rules in section 3.
Give me the file as one json code block, then a short list of what is in it.
```

### b) One file for both Moodle and QuizClap

```text
Use the attached QuizClap AI agent guide. From my attached notes on [topic], write [10] quiz questions
as a Moodle XML file (Mode A, Moodle formats), one category named "[Week 6 check]".
Mix one-answer, several-answer, true or false, and numeric questions, each with general feedback.
Write math as \( ... \). I will import the same file into Moodle and into QuizClap.
```

For GIFT instead of Moodle XML, ask for "a GIFT file" in the same prompt.

### c) Build the event for me (MCP or REST)

```text
Use the attached QuizClap AI agent guide, Mode B. My API key is in the environment variable
LECTURELIVE_API_KEY; never print it. Create the event [EGE311-W06] titled [Week 6: Heat exchangers]
for [2026-11-30], fill it from my attached slides as in section 3 (warm-up, concept checks, a quiz,
an exit survey), check it with get_event, and give me the join, host and projector links.
Do not launch anything on stage.
```

### d) After class: review results and write follow-ups

```text
Use the attached QuizClap AI agent guide. Here are the results of my class [attached QuizClap
results file, or: read them with get_report and get_results for event EGE311-W06].
Tell me which quiz questions were under 60% correct and the wrong answer most students picked,
group the exit survey's muddiest points into themes, and list the unanswered Q&A questions with the
most votes. Then write 3 new concept-check poll questions for the start of next class, in QuizClap JSON.
```

## 2. Mode A: files and paste (no setup)

Pick one format and give the lecturer one code block or one file.

| Format | Best for | How the lecturer adds it |
| --- | --- | --- |
| QuizClap JSON | Everything QuizClap can do, nothing lost | Import file (.json), or Quick paste |
| QuizClap Quick paste | Short plain text, easy to edit by hand | Quick paste |
| Moodle XML | One file for Moodle and QuizClap | Import file (.xml), Quick paste, or Moodle Question bank, Import |
| GIFT | Plain text for Moodle and QuizClap | Import file (.gift or .txt), Quick paste, or Moodle import |
| Aiken | Simplest one-answer questions | Import file (.txt), Quick paste, or Moodle import |

QuizClap also reads Excel (.xlsx), CSV, Word 2010 tables (.docx, Moodle's wordtable layout), Blackboard (.zip, .dat), Moodle Embedded answers (Cloze) and Missing word files. It exports an event's questions in all of these except Missing word, which is import only (export GIFT instead, and import that file as GIFT).

### 2.1 QuizClap JSON (recommended)

One object with two lists: `polls` (poll sets) and `quizzes`. Index numbers in `correct` count from 0.

```json
{
  "polls": [
    {
      "title": "Warm-up",
      "paced": true,
      "questions": [
        { "kind": "words", "text": "One word you link with semiconductors", "maxEntries": 2 },
        { "kind": "rating", "text": "How sure are you about last week's topic?", "scale": 5, "style": "stars", "lowLabel": "Lost", "highLabel": "Could teach it" }
      ]
    },
    {
      "title": "Concept check",
      "questions": [
        { "kind": "choice", "text": "Which material has the widest band gap?", "options": ["Silicon", "Germanium", "Diamond"], "multi": false, "correct": [2], "note": "Diamond is about $5.5$ eV." },
        { "kind": "rank", "text": "Rank these by how often you use them", "options": ["Lecture notes", "Textbook", "Videos"] }
      ]
    },
    {
      "title": "Exit survey",
      "paced": false,
      "questions": [
        { "kind": "rating", "text": "Today's pace", "scale": 5, "style": "numbers", "lowLabel": "Too slow", "highLabel": "Too fast" },
        { "kind": "text", "text": "What was the muddiest point today?" }
      ]
    }
  ],
  "quizzes": [
    {
      "title": "Week 6 check",
      "autoEnd": true,
      "questions": [
        { "kind": "one", "text": "Photon energy at 500 nm? Use $E_g = 1240/\\lambda$ (eV, nm).", "options": ["$2.48$ eV", "$1.24$ eV", "$0.62$ eV", "$4.96$ eV"], "correct": [0], "seconds": 45, "points": "double", "explain": "$1240/500 = 2.48$ eV." },
        { "kind": "multi", "text": "Pick every direct band gap semiconductor", "options": ["GaAs", "Si", "InP", "Ge"], "correct": [0, 2], "seconds": 30, "points": "normal", "explain": "Si and Ge are indirect." },
        { "kind": "tf", "text": "Doping silicon with phosphorus makes it n-type.", "options": ["True", "False"], "correct": [0], "seconds": 20, "points": "normal", "explain": "Phosphorus gives a spare electron." },
        { "kind": "type", "text": "Band gap of silicon at 300 K, in eV?", "options": [], "accept": ["1.12", "1.1"], "seconds": 30, "points": "normal", "explain": "About $1.12$ eV." },
        { "kind": "order", "text": "Put in order of band gap, smallest first", "options": ["Ge", "Si", "GaAs", "GaN"], "seconds": 40, "points": "none", "explain": "0.66, 1.12, 1.42 and 3.4 eV." }
      ]
    }
  ]
}
```

**Poll sets** (`polls`): each is `{ "title", "paced", "questions" }`.

- `title`: the heading shown above the question (up to 300 characters). Give every set of 2 or more questions a short title.
- `paced`: for sets of 2 or more questions. `true` (the default) steps the class through one question at a time; the lecturer presses Next to open each question, then its results, then its answer. `false` shows every question on one form, like a survey or online form.
- Up to 20 questions per set and 100 poll sets per event. A one-question set is a single poll.

Poll question kinds (`kind`):

| kind | Fields | Notes |
| --- | --- | --- |
| `choice` | `options` (2 to 12), `multi` (true or false), `maxChoices`, `correct`, `note` | `correct` is optional and shown only when the lecturer reveals it. `note` is a short explanation shown with the answer. |
| `words` | `maxEntries` (1 to 10, default 3) | A word cloud. Each phone sends up to `maxEntries` words. |
| `rating` | `scale` (2 to 10, default 5), `style` ("stars" or "numbers"), `lowLabel`, `highLabel` | Labels up to 40 characters, for example "Too slow" and "Too fast". |
| `text` | none | Open text answers, any length up to 2,000 characters. |
| `rank` | `options` (2 to 10) | Students put the options in order of preference. |

**Quizzes** (`quizzes`): each is `{ "title", "autoEnd", "questions" }`.

- `autoEnd`: `true` ends a question's timer as soon as every player online has answered.
- Up to 50 questions per quiz and 30 quizzes per event.

Every quiz question has `kind`, `text` (up to 300 characters), `seconds` (5 to 240, default 20), `points` and `explain` (up to 600 characters, shown at the reveal).

| kind | Fields | Notes |
| --- | --- | --- |
| `one` | `options` (2 to 6), `correct` (one index) | One right answer. |
| `multi` | `options` (2 to 6), `correct` (several indexes) | All or nothing: a player must pick exactly the right set. |
| `tf` | `options` ["True", "False"], `correct` [0] for true or [1] for false | True or false. |
| `type` | `accept` (up to 10 answers, each up to 80 characters) | Students type the answer. Numbers match by value, so 9.80 equals 9.8. Case does not matter. |
| `order` | `options` (2 to 6) in the RIGHT order | Phones show them shuffled. |

`points`: `"normal"` (up to 1,000 for a fast right answer), `"double"` (up to 2,000) or `"none"` (practice, no points).

Any poll or quiz question may also carry `"image"` (a picture id, Mode B only) and `"alt"` (what the picture shows).

### 2.2 QuizClap Quick paste

Plain text. The lecturer pastes it into **Quick paste** and sees a live preview before adding.

```text
Poll set: Warm-up
1. One word you link with semiconductors [words 2]
2. How sure are you about last week's topic? [rating 5 stars]

Quiz: Week 6 check
1. Which material has the widest band gap? [30s]
- Silicon
- Germanium
* Diamond
> Diamond is about $5.5$ eV.

2. Pick every direct band gap semiconductor [multi] [double]
A. GaAs
B. Si
C. InP
D. Ge
Answer: A, C
> Si and Ge are indirect.

3. Doping silicon with phosphorus makes it n-type. [tf]
* True
- False

4. Band gap of silicon at 300 K, in eV?
= 1.12 | 1.1

5. Put in order of band gap, smallest first [order]
- Ge
- Si
- GaAs
- GaN

Survey: Exit survey
1. Today's pace [rating 5]
2. What was the muddiest point today? [text]
```

Rules:

- A header line starts each group: `Quiz: title`, `Poll set: title` (one question at a time) or `Survey: title` (all on one form). Without a header, the lecturer picks what the questions become.
- Start each question on a new line. Numbers like `1.` are optional. A blank line ends a question.
- Options start with `-`, `*`, `A.` or `a)`. Mark right answers with `*`, or add a line `Answer: B` (or `Answer: A, C`).
- Typed answers: a line `= 1.12 | 1.1` lists every accepted answer.
- Explanation shown after the reveal: a line starting with `>`.
- Tags at the end of the question line: `[30s]` timer, `[double]` or `[none]` points, `[multi]`, `[tf]`, `[order]`. For polls: `[words]`, `[words 2]`, `[rating]`, `[rating 10]`, `[rating 5 stars]`, `[rating 7 numbers]`, `[text]`, `[rank]`.

### 2.3 Moodle formats (one file for Moodle and QuizClap)

Use these when the lecturer also wants the questions in a Moodle question bank. QuizClap reads all 8 formats Moodle imports, and it adds the right QuizClap settings:

| Moodle | Becomes in QuizClap |
| --- | --- |
| A category (`<question type="category">` or `$CATEGORY:`) | One quiz per category, named after its last part. A category named `Poll set: name` or `Survey: name` becomes a poll set or survey. |
| multichoice with one answer | Quiz question, one answer |
| multichoice with several answers, or multichoiceset (all or nothing) | Quiz question, several answers, all or nothing |
| truefalse | True or false |
| shortanswer, numerical | Typed answer; every answer with 100% becomes an accepted answer |
| ordering | Put in order |
| essay | An open text question in a poll set placed after the quiz, so nothing is lost |
| Cloze, drag and drop into text, select missing words | One question per gap |
| Default mark 2 or 0 | Double points or no points |
| `[30s]` or `[double]` in the question name | Timer and points |

Left out, with a note in the preview: matching, calculated, drag onto image, description pages, part marks (only the best answer stays right), and numeric tolerance (only the exact answer is kept; a range like 1..5 keeps its middle value).

When QuizClap exports to Moodle:

- Ordering questions need Moodle 4.4 or later (or the Ordering plugin) in Moodle XML. In GIFT they use Moodle's ordering block (`{>0 ALL VERTICAL ABSOLUTE_POSITION SHOW none` and then one item per line), also Moodle 4.4 or later. Blackboard and Word table exports leave them out (with a message), because Moodle's Blackboard and Word table readers have no ordering type.
- Moodle reads a whole Cloze file as one question with every gap in it. Use Moodle XML for separate questions.
- Every grade written is one Moodle accepts (100, 50, 33.33333 and the rest of its list), so the import works with Moodle's default "Error if grade not listed".

Math for Moodle: Moodle shows math written as `\( ... \)` (inline) or `\[ ... \]` (display), and QuizClap reads both, so use those delimiters in Moodle files.

**Moodle XML** (the safest choice; keeps HTML, math and feedback):

```xml
<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="category">
    <category><text>$course$/top/Week 6 check</text></category>
  </question>
  <question type="multichoice">
    <name><text>Q1 [30s]</text></name>
    <questiontext format="html"><text><![CDATA[<p>Which material has the widest band gap?</p>]]></text></questiontext>
    <generalfeedback format="html"><text><![CDATA[<p>Diamond is about \(5.5\) eV.</p>]]></text></generalfeedback>
    <defaultgrade>1</defaultgrade>
    <single>true</single>
    <shuffleanswers>true</shuffleanswers>
    <answer fraction="0" format="html"><text>Silicon</text></answer>
    <answer fraction="0" format="html"><text>Germanium</text></answer>
    <answer fraction="100" format="html"><text>Diamond</text></answer>
  </question>
  <question type="numerical">
    <name><text>Q2</text></name>
    <questiontext format="html"><text><![CDATA[<p>Photon energy at 500 nm in eV? Use \(E_g = 1240/\lambda\).</p>]]></text></questiontext>
    <answer fraction="100"><text>2.48</text><tolerance>0</tolerance></answer>
  </question>
  <question type="truefalse">
    <name><text>Q3</text></name>
    <questiontext format="html"><text>Doping silicon with phosphorus makes it n-type.</text></questiontext>
    <answer fraction="100"><text>true</text></answer>
    <answer fraction="0"><text>false</text></answer>
  </question>
  <question type="essay">
    <name><text>Muddiest point</text></name>
    <questiontext format="html"><text>What was the muddiest point today?</text></questiontext>
  </question>
</quiz>
```

For questions with several right answers use `multichoice` with `<single>false</single>` and right fractions that add up to 100 (for example 50 and 50, or 33.33333 three times). `<question type="multichoiceset">` (with `fraction="100"` on each right answer) is all or nothing, but a Moodle site can import it only with the All-or-Nothing Multiple Choice plugin.

**GIFT** (plain text):

```gift
$CATEGORY: $course$/top/Week 6 check

::Q1 [30s]::Which material has the widest band gap?{
  ~Silicon
  ~Germanium
  =Diamond#Diamond is about 5.5 eV.
}

::Q2 [double]::Pick every direct band gap semiconductor{
  ~%50%GaAs
  ~%-100%Si
  ~%50%InP
  ~%-100%Ge
}

::Q3::Doping silicon with phosphorus makes it n-type.{T}

::Q4::Band gap of silicon at 300 K, in eV?{#1.12}

::Q5::Name the dopant that makes silicon p-type.{=boron =B}

::Q6::What was the muddiest point today?{}
```

GIFT rules: `=` marks a right answer and `~` a wrong one; `#` starts feedback; `{T}` and `{F}` are true or false; `{#1.12}` is a number; `{}` is an open (essay) question. The characters `~ = # { } :` are special: write `\~ \= \# \{ \} \:` when you mean them as text, also inside formulas. Moodle reads `\n` in GIFT as a new line and `\\` as one backslash, so in GIFT write `\\nu`, `\\neq` and `\\nabla` with the backslash doubled, or put such formulas in Moodle XML.

**Aiken** (one right answer only):

```aiken
Which material has the widest band gap?
A. Silicon
B. Germanium
C. Diamond
ANSWER: C

Which dopant makes silicon n-type?
A. Boron
B. Phosphorus
ANSWER: B
```

Aiken holds only questions with one right answer: a line for the question, options `A.` to `Z.`, then `ANSWER: <letter>`. Keep each question on one line.

## 3. STEM, math, diagrams and good questions

### Writing questions

- One idea per question, at most about 120 characters, so it fits a phone without scrolling.
- Wrong options are real misconceptions students hold, never joke options. Keep options short (under about 40 characters) and similar in length.
- Typed numeric answers: list every accepted form in `accept` (`["9.81", "9.8"]`). Numbers match by value. Put the unit in the question ("in m/s2?"), never in the answer.
- Timers: 20 seconds for recall, 30 for a concept, 60 to 120 for a calculation.
- `"double"` points for the hardest one or two questions, `"none"` for a practice question.
- Every quiz question gets an `explain` line: why the right answer is right, or the step most students miss.
- A poll `choice` question can have a `correct` answer and a `note`, revealed only when the lecturer chooses.

### Math (KaTeX)

- Inline: `$E_g = 1240/\lambda$` or `\(E_g = 1240/\lambda\)`. Display on its own line: `$$\eta = 1 - \frac{T_C}{T_H}$$` or `\[ ... \]`.
- A literal dollar sign next to a number: write `\$5`.
- In JSON every backslash is doubled: `"$\\frac{dT}{dx}$"`. In Quick paste, GIFT and Moodle XML write it once.
- `**bold**`, `*italic*` and `` `code` `` also work. Plain text otherwise: no HTML in QuizClap formats.

### Diagrams and pictures

- PNG, JPEG or WebP, at most 1 MB, about 1,600 pixels on the longest side. In Mode A, tell the lecturer which picture goes with which question; they add it in the question editor. In Mode B, upload it with `upload_image` and put its id on the question.
- Phones see the picture from the start, also before a quiz answer is revealed. Crop or white out any label that gives the answer away.
- Mark parts of a diagram with numbers (1, 2, 3), never letters, which clash with answer letters A to D.
- With a picture, keep each option under about 40 characters so the projector fits it beside the picture. Always give `alt` text that describes the picture.

### A good lecture rhythm

1. **Warm-up poll set** (start of class): a `words` question ("one word you link with ...") and a `rating` on last week's topic.
2. **Concept check poll set** (after each key idea, 1 or 2 per class): a `choice` question with `correct`, a `rating` on confidence, the same question again after students talk to a neighbour, then confidence again.
3. **Quiz** of 5 to 8 questions mixing `one`, `multi`, `tf`, `type` and `order`, with explanations.
4. **Exit survey** (`paced: false`): a `rating` on pace and a `text` question, "What was the muddiest point today?"

## 4. Mode B: direct control (MCP and REST API)

Use this only when the lecturer has given you a key. Every call reaches only the events of the lecturer who owns the key. A key cannot make other keys, change a password or invite people.

### Get a key

1. The lecturer logs in at https://quizclap.com/host, opens **My events**, then the **API keys** tab, types a name and presses **Make a new key**. The key starts with `llk_` and is shown only once.
2. Save it as the environment variable `LECTURELIVE_API_KEY` (in the agent's `.env` file or the system environment).

Key safety, always:

- Read the key only from the environment. Never print it, paste it into chat, write it into a file, a commit or a log.
- `get_event` returns projector and clicker keys (`screenKey`, `clickerKey`, `screenUrl`, `clickerUrl`). Give them to the lecturer only in the chat reply and never write them anywhere else.
- If a key leaks, the lecturer presses **Revoke** on the API keys tab.

### Connect over MCP

The MCP server is `https://quizclap.com/mcp` (Streamable HTTP). Every request sends the header `Authorization: Bearer <key>`.

Hermes (`config.yaml` in the Hermes home folder; the key goes in `.env` as `LECTURELIVE_API_KEY`):

```yaml
mcp_servers:
  lecturelive:
    url: "https://quizclap.com/mcp"
    headers:
      Authorization: "Bearer ${LECTURELIVE_API_KEY}"
```

Or in one command, which asks for the key: `hermes mcp add lecturelive --url https://quizclap.com/mcp --auth header`

Claude Code (run in a shell where `LECTURELIVE_API_KEY` is set):

```bash
claude mcp add --transport http lecturelive https://quizclap.com/mcp --header "Authorization: Bearer $LECTURELIVE_API_KEY"
```

Cursor (`~/.cursor/mcp.json`; Cursor reads `${env:NAME}`):

```json
{
  "mcpServers": {
    "lecturelive": {
      "url": "https://quizclap.com/mcp",
      "headers": { "Authorization": "Bearer ${env:LECTURELIVE_API_KEY}" }
    }
  }
}
```

OpenCode (reads `{env:NAME}`, without the dollar sign):

```bash
opencode mcp add lecturelive --url https://quizclap.com/mcp --header 'Authorization=Bearer {env:LECTURELIVE_API_KEY}'
```

In `opencode.json` the same server is `"type": "remote"`, the same `url`, `"oauth": false` and `"headers": { "Authorization": "Bearer {env:LECTURELIVE_API_KEY}" }`.

Claude Desktop runs remote servers through the `mcp-remote` bridge in `claude_desktop_config.json`. That file then holds the key, so keep it private and out of any shared folder:

```json
{
  "mcpServers": {
    "lecturelive": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://quizclap.com/mcp", "--header", "Authorization:${AUTH}"],
      "env": { "AUTH": "Bearer llk_your_key_here" }
    }
  }
}
```

### The 25 MCP tools

| Tool | What it does |
| --- | --- |
| `list_events` | Your events, newest class first, with join, host and projector links |
| `list_templates` | Starter packs: `standard-lecture`, `concept-checks`, `revision-quiz` |
| `create_event` | Makes an event: `code` (3 to 20 letters, numbers or dashes), `title`, `date` (YYYY-MM-DD), optional `template` and `content` ({polls, quizzes}). All or nothing. |
| `get_event` | Links, Q&A settings, what is on stage, and every poll and quiz with its id. Read this before editing. |
| `update_event` | Changes `title`, `date` or the code (`new_code`) |
| `copy_event` | Copies settings, polls and quizzes to `new_code` (next week's class), without answers or scores |
| `delete_event` | Deletes an event for good. Needs `confirm_code` (the code again). |
| `add_content` | Adds polls and quizzes in bulk: JSON `polls` and `quizzes`, a `template`, `text` with `format`, or `file_base64` with `file_name`. All or nothing unless `partial` is true. |
| `update_poll` | Replaces a poll set (`id`, `poll`). After answers only the wording can change. |
| `update_quiz` | Replaces a quiz (`id`, `quiz`). After answers only the wording can change. |
| `copy_item` | Duplicates a poll or quiz right after itself (`kind`, `id`) |
| `delete_item` | Deletes a poll or quiz and its answers |
| `reorder` | Sets the order of polls or of quizzes (`kind`, every `ids` in order) |
| `reset_results` | Clears a poll's answers or a quiz's players and scores; the questions stay |
| `stage_control` | Puts things on stage and moves them along (`action`, `id`, `question`) |
| `qa_settings` | Q&A on or off, open or closed, moderation, student names |
| `list_questions` | Q&A questions with ids (`status`: all, visible, pending, hidden, answered, open) |
| `moderate_question` | approve, hide, show, answer, unanswer, reply (with `text`), highlight, unhighlight, delete, ban_author, unban_author |
| `clear_questions` | Removes every Q&A question. Needs `confirm_code`. |
| `get_results` | Q&A, poll tallies, quiz leaderboards and per-question analysis (`include_responses` for every answer) |
| `get_report` | The short after-class report: participants, Q&A, quiz accuracy, weak questions with the most picked wrong answer, open questions |
| `upload_image` | Uploads a PNG, JPEG or WebP (`data_base64`, at most 1 MB) and returns its id |
| `list_images` | The event's pictures, with whether a question uses them |
| `delete_image` | Deletes a picture (`force` to delete one a question still shows) |
| `get_usage` | How much of the free Cloudflare plan is used today |

`add_content` `format` is one of `auto` (the default: detected from the content), `quick_paste`, `json`, `moodle_xml`, `all_or_nothing`, `gift`, `aiken`, `cloze`, `missingword` and `blackboard` for `text`, plus `wordtable` (.docx), `xlsx` and `csv` for `file_base64`. `set` (`quiz`, `poll`, `pollset` or `survey`) says what questions become when the content does not say. The reply lists what was added, the format read and notes on anything left out.

`stage_control` actions: `poll_launch` (with `id`), `poll_lock`, `poll_unlock`, `poll_show_results`, `poll_hide_results`, `poll_reveal_answer`, `poll_hide_answer`, `poll_survey_question` (with `question`), `quiz_launch` (with `id`, opens the lobby), `quiz_next`, `quiz_back`, `quiz_end_timer`, `slide_show_last`, `slide_hide`, `stop`. One thing is on stage at a time.

### REST API

The same actions under `https://quizclap.com/api`, with the same header. Request bodies are JSON and match the MCP tool arguments.

| Method and path | What it does |
| --- | --- |
| `GET /events` and `POST /events` | List events; create one (`code`, `title`, `date`, `template`, `content`) |
| `GET`, `PATCH`, `DELETE /events/<CODE>` | Read, change or delete one event |
| `POST /events/<CODE>/copy` | Copy to a new code (`code`, `title`, `date`) |
| `GET /events/<CODE>/content` | Every poll and quiz with ids |
| `POST /events/<CODE>/import` | Bulk add: same body as `add_content` |
| `POST /events/<CODE>/polls` and `/quizzes` | Add one poll set or quiz |
| `PUT` or `DELETE /events/<CODE>/polls/<id>` | Replace or delete one (also `/quizzes/<id>`) |
| `POST /events/<CODE>/polls/<id>/copy` or `/reset` | Duplicate one, or clear its answers (also `/quizzes/<id>/...`) |
| `POST /events/<CODE>/polls/reorder` | New order: `ids` (also `/quizzes/reorder`) |
| `POST /events/<CODE>/stage` | Stage control (`action`, `id`, `question`) |
| `PATCH /events/<CODE>/qa` | Q&A settings |
| `GET /events/<CODE>/questions` | Q&A questions; `POST /events/<CODE>/questions/<id>` moderates one |
| `POST /events/<CODE>/questions/clear` | Removes every Q&A question; the body repeats the code as `confirm` (the MCP tool calls it `confirm_code`) |
| `GET /events/<CODE>/results` and `/report` | Results and the after-class report |
| `GET /events/<CODE>/export?what=results&format=xlsx` | Results as a file: `xlsx`, `csv` or `json` |
| `GET /events/<CODE>/export?what=content&format=moodle_xml` | Questions as a file: `moodle_xml`, `all_or_nothing`, `gift`, `aiken`, `wordtable`, `blackboard`, `cloze`, `xlsx`, `csv` or `json` |
| `POST /events/<CODE>/images` | Upload a picture: raw bytes with `Content-Type: image/png`, `image/jpeg` or `image/webp` |
| `GET /events/<CODE>/images` and `DELETE /events/<CODE>/images/<id>` | List or delete pictures |
| `GET /usage` | Free plan use today |

With curl (the key comes from the environment):

```bash
curl -s https://quizclap.com/api/events -H "Authorization: Bearer $LECTURELIVE_API_KEY"

curl -s -X POST https://quizclap.com/api/events/EGE311-W06/import \
  -H "Authorization: Bearer $LECTURELIVE_API_KEY" -H "Content-Type: application/json" \
  -d @content.json
```

With Python (standard library only):

```python
import json, os, urllib.request

KEY = os.environ["LECTURELIVE_API_KEY"]
BASE = "https://quizclap.com/api"

def call(method, path, body=None):
    req = urllib.request.Request(BASE + path, method=method,
        data=None if body is None else json.dumps(body).encode(),
        headers={"Authorization": "Bearer " + KEY, "Content-Type": "application/json"})
    with urllib.request.urlopen(req) as r:
        return json.loads(r.read())

gift = open("week6.gift", encoding="utf-8").read()
print(call("POST", "/events/EGE311-W06/import", {"text": gift, "format": "gift"})["added"])
```

### Working safely

1. Run `list_events` first and follow the lecturer's code pattern (for example `EGE311-W06`). The site page names `LOGIN`, `INVITE`, `RESET`, `HOST`, `SCREEN`, `API`, `ASSETS`, `GUIDE`, `AI-GUIDE`, `ABOUT`, `MCP`, `PRICING`, `SIGNUP`, `TERMS`, `PRIVACY` and `PAY` cannot be event codes.
2. `create_event` and `add_content` are all or nothing: on any error nothing is added and each problem is listed with its place. Fix those items and send again.
3. Check with `get_event`, then give the lecturer the join, host and projector links and a short list of what was added.
4. Content stays hidden from students until it is launched. Launch (`stage_control`) only when the lecturer asks during class.
5. After a dry run on stage, `stop`, then `reset_results` on each item you tested, so the class starts at zero.
6. `delete_event`, `clear_questions`, `delete_item`, `reset_results` and `delete_image` remove data for good. Run them only when the lecturer has asked for that exact action in this conversation.
