Skip to main content
Glama

Enroll a user in a course

axislms_enroll_user_in_course
DestructiveIdempotent

WRITE: enroll a user in an online course (optionally with access start and end dates). The user and the course must be active. If the user is already enrolled, send start or end to change the enrollment dates. Depending on the LMS settings the user may be notified. POST /courses/enrollments/{course_id}/{user_id}/.

Input Schema

NameRequiredDescriptionDefault
endNoAccess end date, yyyy-mm-dd; must be after the start date.
startNoAccess start date, yyyy-mm-dd.
user_idYes
course_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag write/destructive/idempotent/open-world, and the description adds genuine value beyond them: the active-entity prerequisite, the upsert-like date-change path, and the possible notification side effect. That is exactly the contextual disclosure annotations cannot carry.

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?

Front-loads a 'WRITE:' marker, then packs preconditions, update behavior, and side effects into three tight sentences. Zero filler.

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?

For a destructive mutation with no output schema, the description covers prerequisites, the idempotent re-enroll case, and notifications. The only shortfall is not mentioning unenroll_user_from_course as the reversal path or what a successful response looks like.

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?

Only start and end are described in the schema (50% coverage); user_id and course_id have no descriptions at all. The description clarifies the dates' role as access/enrollment dates but does nothing to disambiguate the two undocumented IDs, so it adds marginal value over the schema.

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

Purpose4/5

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

States a concrete verb and resource ('enroll a user in an online course') and even names the endpoint, so the action is unmistakable. The word 'course' separates it from the enroll_user_in_ilt_session and enroll_user_in_learningpath siblings, though it never explicitly contrasts with them.

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?

Gives real preconditions ('user and course must be active') and a distinct secondary mode ('if the user is already enrolled, send start or end to change the enrollment dates'). It does not point at an alternative tool, but the conditions for correct use are spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.