moodle-mcp-server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MOODLE_URL | Yes | Base URL for the Moodle instance to query. | |
| MOODLE_TOKEN | Yes | Moodle Web Services API token. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_coursesA | List all LMS courses visible to the configured API token. Returns course ID, full name, short name, category, category path, and visibility. Supports filtering and pagination via categoryid, categoryname, 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 limit and offset for subset requests like first 10 or first 50. Do not request the full course list unless the user explicitly asks for all courses. Use this to discover available courses before drilling into details. Prefer exact category IDs from list_categories when available. |
| get_courseA | Fetch complete details for a single Moodle course by ID. Returns full name, short name, summary, category, format, start/end dates, enrollment methods, and completion tracking settings. |
| list_course_usersA | 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. |
| list_assignmentsA | 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. |
| get_site_infoA | 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_categoriesA | 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. |
| get_userA | 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. |
| list_user_coursesA | 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. |
| search_usersA | 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. |
| search_courses_by_nameA | 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. |
| get_cache_statusA | 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. |
| manage_cacheB | 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. |
| get_user_field_schemaA | 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_schemaA | 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 against the stored schema and only updates if there are differences to report. |
| update_user_field_schemaA | 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, suspended, confirmed, idnumber). For a single field, prefer the shortcut fields: field='username', display=false. EXAMPLES: 'hide username from user tables' → {"field":"username","display":false}. 'hide firstaccess and department from user tables' → {"updates":{"firstaccess":{"display":false},"department":{"display":false}}}. 'make city visible in tables and available to schema-aware filters' → {"updates":{"city":{"display":true,"filterable":true}}}. 'show a discovered custom field in tables' → {"updates":{"customFieldKey":{"display":true}}}." |
| reorder_user_field_schemaA | 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","before":"lastaccess"}. 'move full name to the far left' → {"field":"fullname","position":"start"}. |
| get_capabilitiesA | 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_configA | Internal client configuration tool. Returns declarative agent routing, prompt, rewrite, and continuation rules registered by core and loaded plugins. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/csmediapro/moodle-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server