Open a course item
get_moduleOpens a single Moodle item from its course-module id and returns its content: resources, URLs, pages, forums, assignments, quizzes, and more. Use any cmid/link to get details without needing the course id.
Instructions
Open ONE item a teacher posted and return its content, given its cmid (course-module id — the id in a /mod//view.php?id= link, or from get_course_contents). course_id is OPTIONAL — omit it and it's resolved from the cmid, so a bare cmid/link is enough. It detects the item type and returns:
resource/folder -> files:[{filename, mimetype, size, url}] (open the url/view_url in a browser to download; no direct download here yet)
url -> external_url
page -> html (plain text)
label -> text
forum -> forum_id + intro + discussions[] (read one with get_announcement)
assign -> description (instructions), attachments, due/opens/cutoff, grade_max, status, submission{submitted_at,files,text}, feedback{grade,grade_display,graded_at,comment,files}
quiz -> metadata + attempts · otherwise -> description
Always includes {course_id, cmid, instance, type, name, view_url}.
Credentials come from the MCP settings headers, not from you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cmid | Yes | Course-module id (the id in a view.php?id= link). | |
| course_id | No | Moodle course id. Optional — resolved from cmid if omitted. |