Skip to main content
Glama

Update question

moodle_update_question

Edit an existing Moodle question by changing only the fields you specify; updates are saved as a new version, with answer lists replaced or true/false correctness set.

Instructions

Edits an existing question (Moodle saves it as a new version). Only the given fields change. "answers" replaces the whole answer list (multichoice/shortanswer/numerical); "correct" is for truefalse.

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": {
      "question_id": "<question_id>"
    },
    "name": "moodle_update_question"
  }
}

Input Schema

NameRequiredDescriptionDefault
cmidNoQuiz cmid: use the quiz's own question bank instead of the course one
nameNo
textNo
singleNo
statusNo
answersNo
correctNo
courseidNoCourse id: use the course question bank
idnumberNo
raw_fieldsNoAdvanced: raw question form fields to override
defaultmarkNo
question_idYes
shuffleanswersNo
generalfeedbackNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/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, so the mutation and external-state profile is partly covered. The description earns credit for disclosing two non-obvious traits: edits create a new version rather than mutating in place, and "answers" replaces the entire answer list. It still omits permission requirements, what happens on conflict or version pile-up, and error behavior for a 14-parameter mutation.

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?

Two short sentences, front-loaded with the mutation and versioning caveat, with per-field notes grouped afterwards. No wasted phrasing; the only shortfall is density of raw_field-level detail being squeezed into one clause.

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 high-complexity tool with 14 parameters, nested objects, low schema coverage and no output schema, the description is a reasonable core but not sufficient. It should say what is returned (the new version id, question object) and how the course-versus-quiz question bank selection driven by cmid/courseid behaves, since those are decision-critical and undocumented.

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

Parameters2/5

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

Schema description coverage is only 21% across 14 parameters, including a nested answers object, so the description carries a heavy compensation burden. It clarifies only two fields ("answers" replaces the whole list for multichoice/shortanswer/numerical; "correct" is for truefalse) and leaves name, text, status, defaultmark, single, shuffleanswers, generalfeedback, idnumber, raw_fields, cmid and courseid entirely unexplained in both places.

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?

States a specific verb and resource ("Edits an existing question") and immediately clarifies the versioning behavior, which distinguishes it from create-type siblings. However, it never names a sibling like moodle_create_questions or moodle_get_question to route between read/create/update paths.

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?

"Only the given fields change" establishes the partial-update usage pattern, and the note scopes "answers" and "correct" to particular question types. Beyond that there is no explicit when-to-use versus when-to-create guidance, and no stated prerequisites (permissions, whether the question must be in a quiz or bank).

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