Skip to main content
Glama

Create quiz

moodle_create_quiz

Creates a new quiz in a specified Moodle course section, hidden from students by default unless visibility is enabled, and returns the new course module ID.

Instructions

Creates a new quiz in a course section. New quizzes are hidden by default (visible=false) unless visible=true is passed. Returns the new cmid.

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": {
      "courseid": "<courseid>",
      "section": "<section>",
      "name": "<name>"
    },
    "name": "moodle_create_quiz"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
introNoDescription (HTML)
reviewNoReview options: what students see during the attempt, immediately after, later while open, after closing
subnetNo
sectionYesSection number (see moodle_list_sections)
visibleNoShow the quiz to students
attemptsNoAttempts allowed, 0 = unlimited
courseidYes
timeopenNo"YYYY-MM-DD HH:MM" in the Moodle user timezone; null = no opening date
gradepassNoGrade to pass
navmethodNo
timecloseNo"YYYY-MM-DD HH:MM"; null = no closing date
raw_fieldsNoAdvanced: raw modedit form fields to override (null = unset/uncheck)
grademethodNo
quizpasswordNo
attemptonlastNo
decimalpointsNo
repaginatenowNo
shuffleanswersNo
browsersecurityNo"-" none, "securewindow" full screen popup
overduehandlingNo
showdescriptionNo
canredoquestionsNo
questionsperpageNoNew page every N questions, 0 = all on one page
timelimit_minutesNo0/null = no time limit
preferredbehaviourNodeferredfeedback | interactive | immediatefeedback | adaptive | adaptivenopenalty | deferredcbm | immediatecbm

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already declare the safe-but-mutating profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true), so the bar is lower. The description does add two genuinely useful behavioral facts the annotations do not cover: quizzes default to hidden, and the tool returns the new cmid. It says nothing about permissions, prerequisites, or validation failure modes.

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

Conciseness5/5

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

Three short sentences, front-loaded with the action, followed by the non-obvious default and the return value. Zero filler.

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 26-parameter creation tool with a nested review object and no output schema, the description covers only the visibility default and the returned cmid. It is adequate to call the tool but leaves the agent underspecified on important option groups and on what a created-but-hidden quiz means for students.

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?

With 26 parameters and only 50% schema coverage, the description should carry more weight, but it only clarifies the default semantics of the visible flag. Advanced parameters such as raw_fields, preferredbehaviour, and the nested review object are left entirely to the schema, whose descriptions are terse.

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 opens with a specific verb and resource: 'Creates a new quiz in a course section,' which immediately separates it from mutation siblings like moodle_update_quiz_settings or read siblings like moodle_get_quiz. It does not explicitly name an alternative, but the create-vs-update distinction is unambiguous from the verb.

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 agent learns it needs a course section (pointing at moodle_list_sections via the schema) but is told nothing about when to prefer this over alternatives, or that questions must subsequently be added with moodle_add_questions_to_quiz. No when-not guidance is offered.

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