Skip to main content
Glama

enrol_csv

Batch-enrol users from a CSV into a Moodle course, creating missing users with temporary passwords and showing status per row.

Instructions

Batch-enrol users in a course from a CSV (email,firstname,lastname[,role]). Creates missing users by default with a random temp password. Returns per-row status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
course_idYes
csv_contentYesCSV with headers email,firstname,lastname[,role]. role defaults to student.
default_role_shortnameNostudent
create_users_if_missingNoIf true, unknown emails trigger a user creation with a random temp password.
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the behavioral burden. It discloses two key traits: 'Creates missing users by default with a random temp password' and 'Returns per-row status'. This covers the main side effect and result format. However, it does not mention permission requirements, whether existing users' roles are updated, or how errors in the CSV are handled. It provides moderate transparency but not full disclosure for a mutation operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is exactly two sentences, front-loaded with the primary action and input format, followed by key behavioral notes. Every sentence adds essential information without redundant wording. It is concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (4 parameters, no output schema, no annotations), the description covers the essential aspects: CSV format, user-creation behavior, and per-row status. It does not explain the detailed content of the status return or any permission/prerequisite requirements, but it provides enough for an agent to understand the tool's core purpose and side effects. It is reasonably complete for a batch operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: csv_content and create_users_if_missing have descriptions, while course_id and default_role_shortname do not. The description adds the CSV column layout and optional role, which supplements csv_content. It also confirms the default user-creation behavior. However, it does not explain course_id semantics or how default_role_shortname interacts with the optional role column in the CSV, leaving some parameters under-described.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Batch-enrol users in a course from a CSV'. It specifies the resource (course users), the action (enrol), and the input format (CSV with email, firstname, lastname, and optional role). This distinguishes it from sibling tools like unenrol_student or list_students, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context that this tool is for batch enrollment via CSV, implying it should be used when multiple users need to be enrolled at once. However, it does not explicitly name alternatives or provide when-not-to-use guidance, such as pointing to change_role for individual role changes. The usage context is clear, but exclusions are not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/sernobre/moodle-mcp-sernobre'

If you have feedback or need assistance with the MCP directory API, please join our Discord server