Skip to main content
Glama

add_user_user_group

Assigns a user to a specified user group in LearnWorlds by providing the group ID and user ID or email. Use after verifying the group and user exist; repeated calls can duplicate the assignment.

Instructions

🟡 WRITE · creates data · POST /v2/user_groups/{id}/users/{uid}

Add a user to a user group.

Behavior: creates a record or triggers an action in the live school. Not idempotent: a repeated call can duplicate the effect. 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. Returns: HTTP <status> followed by the LearnWorlds JSON response body. 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 when the user asked to create this. Check with a 🟢 read tool that the target exists and the record is not already there. Related User groups tools: remove_user_user_group, get_users_user_group, deletes_user_group, get_user_group, update_user_group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUnique identifier of the user group
uidYesUser Id or email (encoded string)

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing non-idempotency, duplicate effects, server-side auth injection, throttling/retry behavior, and detailed error/response semantics for non-2xx statuses. This is exactly the kind of behavioral context annotations alone do not provide.

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

Conciseness4/5

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

The description is well-structured with clear labeled sections (Behavior, Returns, Use when) and front-loads the critical WRITE status and endpoint. It is slightly longer than strictly necessary, but every section carries operational value, and the redundancy between 'creates data' and 'Behavior' is minor.

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?

Despite having no output schema, the description fully explains the return format, error behavior, auth model, rate limiting, and when to call the tool. Given the low parameter count and complete schema descriptions, nothing essential is missing for an agent to invoke this tool correctly.

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 have clear descriptions ('Unique identifier of the user group' and 'User Id or email (encoded string)'). The description adds the endpoint path context but does not meaningfully expand parameter semantics beyond the schema, so the baseline of 3 is appropriate.

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: 'Add a user to a user group' with the exact POST endpoint. It distinguishes itself from sibling tools by labeling it as a WRITE/creates-data operation and listing related user-group tools like remove_user_user_group and get_users_user_group, so an agent can tell them apart.

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 when the user asked to create this' and instructs the agent to verify with a read tool that the target exists and the record is not already present. It also names related sibling tools, giving clear routing guidance and exclusion context.

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