Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tools

moodle-mcp exposes 22 tools: 20 curated ones that mirror how you navigate Moodle by hand are always available, and a two-tool escape hatch — list_ws_functions + call_ws_function — reaches everything else your token allows once you enable it with MOODLE_ENABLE_WS_FUNCTION=true. There is no 1:1 dump of the ~350 raw Moodle web-service functions — the curated set covers the student journey; the escape hatch covers the rest.

Every tool returns structured JSON in structuredContent. Document tools (get_course_overview, get_assignment) additionally return markdown in text. Nulls are stripped recursively, because Moodle 3.7 omits many fields that 4.x/5.x include.

Read vs. Write

Each tool is either read-only or a write. Write tools act as the token owner — the server’s instructions tell the agent to confirm with you before calling them, and the tool descriptions repeat it. Uploads land in your private draft area, not with your teacher, until you explicitly finalize a submission.

Identity & Courses

ToolSignatureRead/WritePurpose
whoami()readToken owner identity + site/release
list_courses(search?)readEnrolled courses; optional name filter
get_course_overview(course_id)readWhole-course markdown map

get_course_overview merges five Moodle endpoints into a single markdown document: sections, files, assignments, quizzes, forums, and grades — every ID and file URL embedded, so one call gives the agent (and you) the whole course map.

Assignments

ToolSignatureRead/WritePurpose
get_assignment(assignment_id)readFull document: times, state, description, attachments, submission, grade
submit_assignment(assignment_id, text?, item_id?, finalize?)writeThe single write: online text and/or draft files, optionally finalizing

Forums

ToolSignatureRead/WritePurpose
get_forum_discussions(forum_id)readThread list with opening-post previews
get_discussion_posts(discussion_id)readWhole thread as markdown, attachments included
create_forum_discussion(forum_id, subject, message)writeStart a thread
reply_to_discussion(post_id, subject, message)writeReply (to the opening post = reply to the thread)

Files

ToolSignatureRead/WritePurpose
fetch_file(url)readPDF/DOCX/PPTX/XLSX/ODT/RTF/EPUB/CSV → markdown; 100k-character cap
download_file(url, save_to)readRaw bytes → local path (metadata only)
upload_file(path, item_id?)writeLocal file → draft area

File tools take and return local file paths, never base64. Same-site URLs only, unless MOODLE_ALLOW_EXTERNAL_FETCH=1.

Grades, Schedule & Messaging

ToolSignatureRead/WritePurpose
get_grades(course_id?)readCross-course summary, or every grade item of one
get_schedule(time_from?, time_to?, course_ids?)readMerged timeline (default: next 30 days)
get_notifications(read?, limit?)readRecent notifications
get_conversations(limit?)readConversations with member ids
send_message(user_id, text)writeDirect message
get_quiz_attempts(quiz_id)readAttempt records (read-only)
get_user(field, value)readProfile lookup
search_users(search?, limit?)readUser search

Escape Hatch

ToolSignatureRead/WritePurpose
call_ws_function(wsfunction, params?)read/writeCall any enabled web-service function (PHP bracket notation handled)
list_ws_functions(query?)readDiscover callable web-service functions by keyword

call_ws_function is an intentional overwriting surface. It is hidden unless MOODLE_ENABLE_WS_FUNCTION=true opts in, and MOODLE_READ_ONLY hides it again regardless.

ID Flow

Tools chain through IDs: each level’s output embeds the IDs for the next.

IDProduced byConsumed by
course_idlist_courses, get_course_overviewoverview, grades, schedule, assignments
forum_idget_course_overviewget_forum_discussions, create_forum_discussion
discussion_idget_forum_discussionsget_discussion_posts
post_idget_discussion_postsreply_to_discussion
assignment_idget_course_overview, get_assignmentget_assignment, submit_assignment
item_idupload_filesubmit_assignment
user_idconversations, notifications, get_usersend_message, get_user

What Is Intentionally Not Provided

Quiz-taking. get_quiz_attempts reads attempt records, but nothing answers questions for you. This is a design decision, not a gap.

Version Differences

moodle-mcp targets Moodle 3.7 → 5.x. Differences between versions (function names, pagination, response shapes) are absorbed by the server, not by your prompts — the same tool call works across all supported versions.