Skip to main content
Glama

Enroll a user in a course

talentlms_enroll_user_in_course
Destructive

WRITE: enroll an existing user in a course (as a learner). Returns the assigned role. POST /api/v2/enrollments.

Input Schema

NameRequiredDescriptionDefault
user_idYesThe user id (a positive integer).
course_idYesThe course id (a positive integer).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

Adds real information beyond annotations: it is a write operation, the enrollment role is 'learner', the return value is the assigned role, and the underlying endpoint is POST /api/v2/enrollments. It does not explain idempotency or what happens on duplicate enrollment, and does not reconcile with the destructiveHint=true annotation, which is unexplained for an enroll action.

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?

A single front-loaded sentence with the write marker first, followed by the return value and endpoint. No waste, nothing redundant.

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 two-parameter tool with no output schema, the description covers purpose, mutation nature, return value, and endpoint — enough to call it correctly. Only duplicate-enrollment behavior and the meaning of destructiveHint remain unaddressed.

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 100% and both parameters are fully documented, so the schema carries the load. The description adds no parameter-specific semantics, which is the expected baseline when coverage is complete.

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?

States a specific verb (enroll), resource (user in a course), scope qualifier (as a learner), and even the endpoint. It is clearly distinguishable from siblings like talentlms_add_user_to_group or talentlms_create_user.

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

Usage Guidelines3/5

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

The phrase 'an existing user' implies a prerequisite (the user must already exist), which is useful. However, it never names alternatives or exclusions, and doesn't address what to do if the user is already enrolled.

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.