Skip to main content
Glama

Add questions to quiz

moodle_add_questions_to_quiz

Add existing question-bank questions to a Moodle quiz at the end or on a specified page.

Instructions

Adds existing question-bank questions to a quiz (at the end, or to a given page).

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": {
      "cmid": "<cmid>",
      "question_ids": "<question_ids>"
    },
    "name": "moodle_add_questions_to_quiz"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmidYes
pageNo0 = append at the end
question_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare this is a non-read-only, non-destructive, open-world write. The description adds real value beyond them by disclosing placement behaviour ('at the end, or to a given page'), which tells the agent the operation appends rather than replaces existing quiz slots. It stops short of stating whether existing slots shift, whether pagination is affected, or what failures look like for invalid question IDs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with the verb and resource front-loaded, and the parenthetical placement detail kept tight. No filler, though the parenthetical duplicates information already in the 'page' schema description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a low-complexity three-parameter mutation with no output schema, annotations cover the safety profile and the description covers placement. What is missing is the meaning of the required cmid, any note about reordering/pagination effects on existing slots, and error behaviour — material for an agent assembling a quiz.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33% — only 'page' is documented ('0 = append at the end') — so the description has to compensate. It partially does: 'existing question-bank questions' clarifies that question_ids refer to pre-existing bank items, and the parenthetical restates the page/append semantics. It never explains 'cmid' (course module ID) or that IDs must be valid in the same course, leaving a real gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb ('Adds') and a precise resource ('existing question-bank questions to a quiz'), and the word 'existing' implicitly distinguishes it from moodle_create_questions and moodle_add_random_questions. It never names a sibling explicitly, so the differentiation is inferential rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the phrase 'existing question-bank questions' suggests it requires already-created question IDs, steering an agent away from create/random variants. There is no explicit when-to-use, no precondition (e.g. questions must belong to a category in the same course), and no pointer to alternatives such as moodle_add_random_questions or moodle_move_quiz_slot.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.