Call the Moodle Web Services REST API to create a course, enroll users, and upload a SCORM package using the file upload and mod_scorm_add_instance functions
Generate a Moodle web service token via Site Administration > Plugins > Web services > Manage tokens or the /login/token.php endpoint with username and password
POST to /webservice/rest/server.php with wsfunction=core_course_create_courses and a courses array containing fullname, shortname, categoryid, and format
Call core_enrol_get_enrolled_users to verify enrollments and enrol_manual_enrol_users to enroll a user with roleid 5 (student)
Upload the SCORM ZIP to the Moodle draft file area using the /webservice/upload.php endpoint with the token in the Authorization header
Call core_course_get_contents to verify the file itemid, then call mod_scorm_add_instance to create the SCORM activity referencing the uploaded package's draft itemid
Set the completion tracking fields: completionview, completiononview, and grademethod in the mod_scorm_add_instance params
Known gotchas
Moodle web service functions must be individually enabled in the service definition; a call to an unenabled function returns an access-denied error even with a valid token
The file upload endpoint returns a draft itemid that is valid only for the session duration; the mod_scorm_add_instance call must happen in the same request sequence before the draft expires
Moodle's SCORM player validates the manifest on import; a malformed imsmanifest.xml causes a silent import failure with no API error, only a course-level warning
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp