Skip to main content
Glama

Create questions

moodle_create_questions

Creates one or more Moodle question-bank questions from structured definitions (multichoice, truefalse, shortanswer, numerical, essay, match, description) and returns new question IDs.

Instructions

Creates one or more questions in a question-bank category from structured definitions (multichoice, truefalse, shortanswer, numerical, essay, match, description). Returns the new question ids.

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": {
      "category_id": "<category_id>",
      "questions": "<questions>"
    },
    "name": "moodle_create_questions"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmidNoQuiz cmid: use the quiz's own question bank instead of the course one
courseidNoCourse id: use the course question bank
questionsYes
category_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, and the description's "Creates" is consistent with those. It adds the useful detail that the new question ids are returned, but says nothing about atomicity across the up-to-200 questions array, partial failure behavior, or permission requirements, which is meaningful for a bulk write.

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?

Two sentences, zero waste, front-loaded with the action and the target container before the type list and return value. Every clause carries information an agent needs.

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?

The description covers purpose and return value (important since there is no output schema), but for a bulk mutation tool supporting seven polymorphic question types it omits failure semantics, whether creation is all-or-nothing, and how the category_id/courseid/cmid scoping options interact.

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

Parameters4/5

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

Schema coverage is 50%, but the schema's per-type oneOf blocks are richly documented, and the description compensates by naming the exact type set accepted in the questions array and framing them as structured definitions. It does not clarify how category_id differs from courseid/cmid or which scope wins, leaving the top-level scoping parameters partly implicit.

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

Purpose5/5

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

States a specific verb and resource ("Creates one or more questions in a question-bank category"), scopes the location to a category rather than a quiz, enumerates the seven supported question types, and discloses the return value (new question ids). An agent can distinguish this from moodle_add_questions_to_quiz and moodle_create_question_category from the text alone.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not guidance, no mention of prerequisites (permissions, whether the category must already exist), and no routing to alternatives such as moodle_import_questions for bulk file-based authoring. The phrase "from structured definitions" only weakly implies the use case.

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