moodle-mcp-server-aql

v0.1.6
io.github.csmediapro/moodle-mcp-server-aql Checked 2 days ago Published 2 months ago

Query Moodle LMS data through natural language.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_courses

List LMS courses available to the configured API token. Returns course ID, full name, short name, category, category path, and visibility. Supports filtering and pagination via categoryid, categoryname, visible, limit, and offset. When categoryname is used, it must match an existing category name exactly; if multiple categories share that name, the tool will ask for the ID instead of guessing. Use visible=false for hidden courses and visible=true for visible courses. Use limit and offset for subset requests like first 10 or first 50. Do not request the full course list unless the user explicit…

ParameterTypeDescription
categoryidintegerFilter courses by category ID
categorynamestringFilter courses by exact category name
limitintegerMaximum number of courses to return
offsetintegerNumber of courses to skip before returning results
visiblebooleanFilter by course visibility. false returns hidden courses; true returns visible courses.

get_course

Fetch structured details for a single Moodle course by ID. Returns full name, short name, summary, category, format, start/end dates, visibility, and completion tracking settings.

ParameterTypeDescription
courseid *integerMoodle course ID

list_course_users

List enrolled users in a specific Moodle course or across all courses in a specific LMS category. Provide exactly one of courseid, coursename, or categoryid. Returns user ID, full name, email, department, institution, last access timestamps, and enrollment roles. Category mode deduplicates overlapping users across courses before returning results. Use an exact category ID from list_categories when working at category scope.

ParameterTypeDescription
_siloobjectINTERNAL: Silo filter injected by agent-edge. Not for direct use.
categoryidintegerLMS category ID. Aggregates enrolled users across all courses in the category.
courseidintegerMoodle course ID
coursenamestringMoodle course name for partial matching
limitintegerMaximum users to return
offsetintegerPagination offset

list_assignments

List all assignments in a Moodle course. Returns assignment ID, name, due date, allowed submission types, grade scale, and whether submissions are open. Does not return student submissions — use a separate tool for that.

ParameterTypeDescription
courseid *integerMoodle course ID

get_site_info

Returns information about the connected LMS instance: site name, version, release, authenticated user, available API functions, and total course count (from the pre-warmed cache). No parameters required — always returns cached data.

list_categories

List all LMS categories. Returns category ID, name, description, parent category, path, depth, and course count per category. Supports filtering by parent ID, exact parent name, and pagination. Use this to discover available categories, identify active vs inactive categories, and filter courses by category. Use the exact category ID when querying category-scoped tools.

ParameterTypeDescription
limitintegerMaximum categories to return
offsetintegerPagination offset
parentintegerDeprecated alias for parentid. Filter categories by parent category ID (0 = top-level)
parentidintegerFilter categories by parent category ID (0 = top-level)
parentnamestringFilter categories by exact parent category name

get_user

Fetch one Moodle user by exact ID, email, or username. Provide exactly one of id, email, or username. Returns a single structured user record including any custom profile fields.

ParameterTypeDescription
_siloobjectINTERNAL: Silo filter injected by agent-edge. Not for direct use.
emailstringExact email address
idintegerExact Moodle user ID
presentationstringHow much user detail to display. Use compact for workflow steps and full when explicitly asked for all user details.
usernamestringExact Moodle username

list_user_courses

List courses for a specific Moodle user ID. Requires an exact userid. Use get_user for exact email or username lookups first. Use search_users when a person is identified by name and multiple matches are possible. If multiple people match, ask the operator to choose the correct userid before calling this tool.

ParameterTypeDescription
userid *integerExact Moodle user ID
_siloobjectINTERNAL: Silo filter injected by agent-edge. Not for direct use.
limitintegerMaximum courses to return
offsetintegerPagination offset

search_users

Search Moodle users by firstname, lastname, email, username, or idnumber. Use this for direct person lookup, not structured directory filtering or reports. Provide at least one standard Moodle search field. Moodle performs the filtering first; this tool does not preload the full user directory. If a directory listing plugin is installed, prefer that plugin for filter-style requests. If multiple users match, do not guess downstream actions; select the correct user ID first.

ParameterTypeDescription
_siloobjectINTERNAL: Silo filter injected by agent-edge. Not for direct use.
emailstringSearch by email
firstnamestringSearch by first name
idnumberstringSearch by ID number
lastnamestringSearch by last name
limitintegerMaximum users to return
offsetintegerPagination offset applied after Moodle returns matches
usernamestringSearch by username

search_courses_by_name

Search for courses by name, returning matching courses with their IDs and details. Useful for finding course IDs when you only know part of the course name. Supports partial matching on course full name, short name, and ID number. Case-insensitive search. Returns course ID, full name, short name, category, and visibility. Use this to find course IDs for other tools like list_course_users.

ParameterTypeDescription
searchTerm *stringSearch term to match against course names (case-insensitive partial match)
limitintegerMaximum number of matching courses to return

get_cache_status

Inspect the Moodle course and category caches without changing them. Reports memory load state, disk cache validity, item counts, file size, TTL, timestamps, version, and Moodle site match. This tool never calls Moodle and never returns cached course or category records.

ParameterTypeDescription
targetstringCache target to inspect: courses, categories, or all

manage_cache

Manage the Moodle course and category caches. Allows refreshing or clearing the in-memory and file-backed caches to ensure data freshness or free up memory. Use 'refresh' to update cache with latest data from Moodle, 'clear' to remove cached data, and 'all' to affect both courses and categories.

ParameterTypeDescription
action *stringAction to perform: refresh (update cache) or clear (remove cache)
targetstringTarget to affect: courses, categories, or all

get_user_field_schema

Admin/config tool: return the current user field schema for this Moodle instance. Shows every known user field (standard + custom), its type, source, and whether it is currently set to display in tables or accept filters. Use this when the user explicitly asks to inspect, configure, show, refresh, or troubleshoot the user field schema or table columns. Do not use this before ordinary requests to list or filter users; call list_users directly with filters instead. If no schema exists yet, the response will tell you to run refresh_user_field_schema. No parameters required.

refresh_user_field_schema

Discover all available user fields from the connected Moodle instance and create or update the user field schema. Samples standard fields from the current user and custom profile fields from enrolled users across courses. Use this when: connecting to a new Moodle instance for the first time, or after a Moodle admin adds/removes custom profile fields, or when the operator asks to 'refresh the user fields'. Optional 'force' parameter (default false): when true, re-merges all fields from scratch (operator overrides on still-existing fields are preserved). When false, compares discovered fields ag…

ParameterTypeDescription
forcebooleanForce a full re-merge from scratch even if nothing changed

update_user_field_schema

Update display and filter settings for specific user fields. Only include fields you want to change — omitted fields keep their current settings. Use this when the operator wants to: show or hide a field in user search result tables (display), or enable/disable a field for schema-aware directory filtering (filterable). This is an admin/configuration tool, not a prerequisite for ordinary filtered user-list requests. FIELD KEYS: Use the exact short field keys from get_user_field_schema (common keys: id, fullname, email, username, department, institution, city, country, firstaccess, lastaccess,…

ParameterTypeDescription
displaybooleanShortcut value for whether the single field appears in user tables
fieldstringShortcut for updating one field key, e.g. username
filterablebooleanShortcut value for whether schema-aware directory tools can use the single field as a filter
updatesobjectMap of field keys to new settings. Only include fields you want to change.

reorder_user_field_schema

Reorder displayed user table columns in the user field schema. Use this when the operator asks to move a column left, right, first, last, before another field, or after another field. The field and target values must be exact field keys from get_user_field_schema, such as id, fullname, email, lastaccess, department, institution, or suspended. Natural language examples: 'move last access all the way to the right' → {"field":"lastaccess","position":"end"}. 'move department after email' → {"field":"department","after":"email"}. 'put suspended before lastaccess' → {"field":"suspended","befor…

ParameterTypeDescription
field *stringField key to move, e.g. lastaccess, department, email, or suspended
afterstringMove the field immediately after this displayed field key
beforestringMove the field immediately before this displayed field key
positionstringMove the field to the far left/start or far right/end of displayed columns

get_capabilities

Show the effective registered tool catalog for this Moodle MCP server. Returns currently callable tools grouped by source: core tools and plugin tools. Table view shows Tool, Source, and Description.

get_agent_runtime_config

Internal client configuration tool. Returns declarative agent routing, prompt, rewrite, and continuation rules registered by core and loaded plugins.