Skip to main content
Glama

unenroll_user_product

DestructiveIdempotent

Remove a user's enrollment from a specified course, bundle, or subscription. Use to permanently cancel access after the user confirms removal.

Instructions

๐Ÿ”ด DESTRUCTIVE ยท deletes ยท DELETE /v2/users/{id}/enrollment

Unenroll user from a product specified by the provided product id

Behavior: permanently removes the addressed record from the live school โ€” no undo from this server. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx. Parameters: the whole JSON payload goes in the single body argument, forwarded verbatim (the spec leaves body optional, but this endpoint expects one). Returns: HTTP 200/204, with a body that is usually empty on success. A non-2xx reply surfaces as a tool error with that status and the API error payload โ€” 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input. Use when: only after the user confirms the removal. To merely revoke access or deactivate, use the matching ๐ŸŸก update or unenroll tool instead. Related Users tools: enroll_user_product, get_courses_enrollments_user, get_products_user, get_seat_offerings_that_user_is_member, get_user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser Id or email (encoded string)
bodyNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

The description goes well beyond the destructiveHint annotation by disclosing that removal is permanent with no undo from this server, that auth is injected server-side and never by the model, and that calls are throttled and retried on 429/5xx. It also explains non-2xx behavior and the meaning of specific error codes, which is critical for an irreversible mutation.

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 longer than average but every section earns its place: destructive warning, behavior, parameters, return/error handling, and usage guidance. It is clearly structured with labeled sections, making it easy for an agent to parse, and the most critical safety warning is front-loaded.

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

Completeness5/5

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

For a destructive tool with no output schema, the description is remarkably complete: it covers the HTTP method, permanence, auth, rate limiting, retries, expected success responses, error semantics, and when not to use it. The related-tool list also anchors it in the surrounding toolset.

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

Parameters4/5

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

The schema documents both parameters, but the description adds important non-obvious semantics: the entire payload goes in the single body argument and is forwarded verbatim, and although the spec marks body optional, this endpoint expects one. It does not add much about the individual fields, but the schema already covers those via descriptions and an enum.

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 states a specific verb and resource: 'Unenroll user from a product' and clarifies it 'deletes' the enrollment record. It includes the exact endpoint and clearly distinguishes itself from the sibling enroll_user_product by describing both the opposite operation and its destructive nature.

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

Usage Guidelines5/5

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

It explicitly says 'Use when: only after the user confirms the removal' and tells the agent to use the matching update or unenroll tool instead when the goal is merely revoking access or deactivating. It also lists related tools, giving the agent concrete routing guidance.

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/ohneben/Learnworlds-MCP'

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