moodle-um
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MOODLE_UM_HOME | No | Session/config directory. | ~/.config/moodle-um |
| MOODLE_UM_SITE | No | Moodle base URL. | https://moodle.umontpellier.fr |
| MOODLE_UM_BROWSER | No | Chromium/Chrome executable; auto-detected by default. | |
| MOODLE_UM_MCP_HOST | No | HTTP bind address host. | 127.0.0.1 |
| MOODLE_UM_MCP_PATH | No | Streamable HTTP path; use a random secret for remote mode. | /mcp |
| MOODLE_UM_MCP_PORT | No | HTTP bind address port. | 8765 |
| MOODLE_UM_DOWNLOADS | No | Default download directory. | ~/Downloads/moodle-um |
| MOODLE_UM_MULTIUSER | No | Set to 1 to enable multi-user HTTP mode with one Moodle session per person. | |
| MOODLE_UM_PUBLIC_URL | No | Public HTTPS base URL for multi-user HTTP mode. | |
| MOODLE_UM_LOGIN_TIMEOUT | No | Seconds to wait for ENT login. | 300 |
| MOODLE_UM_MCP_TRANSPORT | No | MCP transport: stdio or http. | stdio |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools for the University of Montpellier Moodle (moodle.umontpellier.fr). The user signs in through ENT/CAS once. Call moodle_status first; if it reports authenticated=false, call moodle_login once before any other tool. The session is then reused. After that, start with moodle_list_courses, then moodle_get_course to see sections and activities. Use moodle_get_page for any page without a dedicated tool (forums, resources, etc.). ALWAYS ask the user for explicit confirmation before moodle_submit_assignment with confirm=true: it is irreversible and may be graded. Use moodle_quiz_start and moodle_quiz_attempt to read the real questions and choices, then present them to the user and let the user decide. Use moodle_quiz_solve to save proposed answers, and moodle_quiz_submit only after explicit user confirmation. Never submit a graded exam without the user's approval.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| moodle_statusA | Check whether a saved Moodle session is valid, and who is logged in. Returns user_id, user_name and site URL. Call this first at the start of a session; if authenticated is false, call moodle_login once. |
| moodle_loginA | Open a Chromium window so the user can sign in through ENT/CAS. The window stays open until the user completes the ENT login (identifiant, password, MFA). It then closes automatically and the session is saved. Only needed once, or when the session has fully expired. |
| moodle_list_coursesB | List the courses the user is enrolled in. Args: query: optional case-insensitive filter on course name or shortname. |
| moodle_get_courseA | Get a course's sections, activities, descriptions, dates and file links. Args: courseid: Moodle course id (from moodle_list_courses). |
| moodle_list_assignmentsB | List the assignments ("devoirs") of a course, with due dates and status. Args: courseid: Moodle course id. |
| moodle_get_assignmentA | Get one assignment: instructions, attachments, due date and submission state. Args:
cmid: course-module id (the |
| moodle_list_quizzesC | List the quizzes/tests ("tests") of a course. Args: courseid: Moodle course id. |
| moodle_quiz_startA | Start or resume a quiz attempt and return its questions and choices. Creates a real attempt on Moodle (it does not submit it). Starting a quiz can consume one of your allowed attempts, so only call this when the user explicitly asks to start or take the quiz. The result contains the attempt id, page, timer, question text, choices and the exact input names to answer with. If Moodle requires a password, an honour statement or Safe Exam Browser, the result says so instead of starting. Args: cmid: course-module id of the quiz. |
| moodle_quiz_attemptA | Read one page of an in-progress quiz attempt. Returns the same question/choice structure as moodle_quiz_start, without creating or submitting anything. Args: attemptid: attempt id from moodle_quiz_start or the attempt URL. page: zero-based page number (default 0). |
| moodle_quiz_solveA | Save answers for one quiz page, using question numbers or choice labels.
Args: attemptid: quiz attempt id. answers: question-number/label map, or raw input-name map. page: optional zero-based page number. |
| moodle_quiz_submitA | Finish and submit a quiz attempt. IRREVERSIBLE. Only call with confirm=true after showing the user the answers and getting an explicit "yes". Args: attemptid: quiz attempt id. page: optional zero-based page number. confirm: must be true. |
| moodle_get_quizA | Get a quiz's settings, attempts and available actions. Args:
cmid: course-module id (the |
| moodle_get_gradesC | Get the user's grade report for a course. Args: courseid: Moodle course id. |
| moodle_upcomingB | List upcoming calendar events and deadlines. Args: limit: maximum number of events (default 30). |
| moodle_get_pageA | Fetch any Moodle page and return it as readable Markdown. Use this for forums, resources, pages, sections, or anything without a
dedicated tool. The URL may be a path like Args: url: path or full URL on moodle.umontpellier.fr. |
| moodle_browserA | Browse any Moodle page in a real headless browser, optionally clicking/filling. This is the universal fallback for anything without a dedicated tool: taking a quiz, filling a form, uploading a file, reading a forum. Each call is stateless but the server-side Moodle state persists. Action objects (executed in order): {"type":"click","selector":"text=Attempt quiz now"} {"type":"fill","selector":"#id_answer","value":"42"} {"type":"select","selector":"select[name=x]","value":"1"} {"type":"check","selector":"input[value=1]"} {"type":"set_file","selector":"input[type=file]","value":"/path/file.pdf"} {"type":"press","value":"Enter"} {"type":"goto","url":"/mod/quiz/attempt.php?attempt=..."} {"type":"wait","value":1000} {"type":"wait_for","selector":".que"} {"type":"scroll","value":800} Returns the page title, URL, readable text, and all visible form elements (with names/labels/options) plus optional screenshot path. JavaScript confirm/alert dialogs are accepted automatically. Args: url: page to open (path or full university URL). actions: optional list of actions to perform before reading the page. screenshot: save a PNG screenshot and return its path. |
| moodle_download_fileA | Download a course file (pluginfile.php / resource) to the local disk. Args: url: file URL from a course or assignment page. dest: optional destination path; defaults to ~/Downloads/moodle-um/. |
| moodle_remove_submissionA | Remove your submission for an assignment. IRREVERSIBLE. Use this to undo an accidental submission. Requires explicit user confirmation (confirm=true). Args: cmid: course-module id of the assignment. confirm: must be true. |
| moodle_submit_assignmentA | Submit an assignment (online text and/or files). IRREVERSIBLE once submitted. Before calling with confirm=true, show the user exactly what will be submitted and get an explicit "yes". If the assignment has an originality statement checkbox, this tool accepts it on the user's behalf. Args: cmid: course-module id of the assignment. text: online text to submit (optional). files: local file paths to upload (optional). submit_for_grading: if true, also post the final "Submit assignment" step. If false, stop after saving — but note that assignments without drafts submit as soon as they are saved. confirm: must be true; safety switch against accidental submissions. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 19 tools
Most tools target clearly distinct resource+action pairs (list vs get assignment, quiz start/attempt/solve/submit). The only real overlap is moodle_get_page versus moodle_browser, both generic fallbacks, though the descriptions differentiate static Markdown reading from interactive headless browser actions. Quiz tools are separated by lifecycle stage in a way that is understandable but requires careful reading.
All tools share a consistent moodle_ prefix, but the verb pattern is mixed: mostly verb_noun (list_courses, get_course, submit_assignment) with a noun_verb quiz cluster (quiz_start, quiz_attempt, quiz_solve, quiz_submit) plus verbless names (status, login, upcoming, browser). It remains readable but is not a single predictable convention.
19 tools is slightly on the heavy side but each maps to a distinct part of the Moodle lifecycle: auth, courses, assignments, quizzes, grades, calendar, file download, and fallbacks. The multi-step quiz flow legitimately requires several tools rather than one generic blob. Nothing appears obviously redundant.
The surface covers login/session, courses, assignments (submit and remove submission), quizzes end-to-end, grades, upcoming deadlines, file download, plus a raw page fetcher and headless browser as escape hatches for forums and forms. Minor gaps remain in dedicated forum/messaging or notifications tools, but the generic fallbacks mitigate them.