Skip to main content
Glama

Get question

moodle_get_question
Read-only

Retrieves a full quiz question definition as Moodle XML, including answers, fractions, feedback and settings, so you can inspect or back up question data; optionally includes embedded images.

Instructions

Full definition of a question (text, answers, fractions, feedback, settings) as Moodle XML. Embedded images are omitted unless include_files=true.

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_get_question"
  }
}

Input Schema

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

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=true and openWorldHint=true, so the safety profile is covered. The description adds real context beyond that: the payload is Moodle XML, embedded images are dropped by default, and include_files flips that. It says nothing about permissions, question-bank resolution behavior, or failure modes when an id is invalid.

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 sentences, front-loaded with what is returned and immediately followed by the one caveat that changes the result. No filler; a slightly clearer mapping of the parenthetical fields to the schema would be the only addition worth making.

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?

With no output schema, the description does well to name the returned representation (Moodle XML) and principal contents. However, for a four-parameter tool with 50% schema coverage, it leaves the scope-selection semantics (course vs quiz question bank) unexplained, which an agent needs in order to call it correctly.

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 50%: cmid and courseid are documented in the schema, while question_id and include_files are not. The description offsets part of that gap by explaining include_files' effect on embedded images, but it never clarifies how cmid/courseid interact with question_id (e.g. which bank is searched) — the most consequential ambiguity for the caller.

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/resource pair implicitly (fetch one question's full definition) and specifies the return representation: Moodle XML with text, answers, fractions, feedback, settings. That distinguishes it from list_questions (enumeration) and export_questions (bulk), though it never names those siblings.

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?

No explicit when-to-use or when-not-to-use guidance and no named alternatives; the only conditional ("unless include_files=true") is a parameter behavior, not routing guidance. An agent must infer that this is the single-question retrieval path from the word "Full definition" alone.

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