Skip to main content
Glama

modify_question

Edit existing Moodle questions to fix typos, reformulate content, or update feedback. Bypasses the Moodle qbank form bug by writing directly to the database.

Instructions

Edit an existing question (typo fix, reformulation, feedback tweak). Writes directly to DB, bypass Moodle 5.0.2 qbank form bug. Input: course_id, question_id, optional name / question_text / answers[]. Coverage: name, text, answers (answer/feedback/fraction).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoNew question name. Pass "" to skip.
answersNoOptional list of answer edits. Each item targets an answer by its 0-based index. Empty array = no answer edits.
course_idYes
question_idYesMoodle question.id (NOT question_bank_entries.id). Get it from import_gift output or question bank UI.
question_textNoNew question text (HTML). Pass "" to skip.
Behavior3/5

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

With no annotations, the description carries the transparency burden. It discloses that the tool writes directly to the DB and bypasses a specific Moodle bug, which is valuable behavioral context. It also enumerates the editable fields. However, it does not mention permissions, reversibility, or return behavior, leaving some significant gaps.

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?

The description is concise and well-structured: it opens with the core purpose, follows with a key behavioral note, and then summarizes inputs. Every sentence adds value without unnecessary verbosity.

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

Completeness4/5

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

There is no output schema, so the description does not need to explain return values, but it could have mentioned likely return behavior. It covers purpose, usage context, behavioral trait (DB write, bug bypass), and parameter summary. For a focused edit tool, this is sufficient, though it omits permission requirements and side effects.

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 description coverage is high (80%), so the baseline is 3. The description adds a high-level summary of inputs and coverage (name, text, answers) but largely repeats what the schema already documents. It clarifies that fields are optional and can be skipped, but that info is already present in the schema descriptions.

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?

The description clearly states the tool's purpose: editing an existing question, with specific examples (typo fix, reformulation, feedback tweak). It uses a specific verb and resource, distinguishing it from other tools in the sibling list such as import_gift or configure_quiz.

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

Usage Guidelines4/5

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

The description provides clear context: for editing questions, and mentions bypassing a known Moodle form bug, which implies when this direct-DB approach is needed. However, it does not explicitly name alternatives or state when not to use this tool, so it stops short of a full 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sernobre/moodle-mcp-sernobre'

If you have feedback or need assistance with the MCP directory API, please join our Discord server