Skip to main content
Glama

get_user_role_user

Read-onlyIdempotent

Look up a user's role in LearnWorlds by user ID or email. Returns current role and assigned resources—courses, user groups, seat offerings, or segments—without modifying anything.

Instructions

🟢 READ-ONLY · GET /v2/users/{id}/user-role

Get user role of a user. Returns the user role of the user specified by the provided user id. Includes the assigned resources, if applicable (assigned course(s) for instructor role, assigned user group(s) for user group managers, assigned seat offering(s) for segment manager, assigned segment for reporter roles).

Behavior: read-only lookup against the live school; creates, changes and deletes nothing. 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: safe to call speculatively for lookups and reporting. Not for changing anything — use the matching 🟡 write tool. Related Users tools: update_user_role_user, enroll_user_product, get_courses_enrollments_user, get_products_user, get_seat_offerings_that_user_is_member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser Id or email

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?

Beyond the readOnlyHint and destructiveHint annotations, the description adds substantial behavioral detail: auth is injected server-side, calls are throttled and retried, returns are HTTP status plus JSON body, and non-2xx replies surface as tool errors with specific status meanings. This fully discloses operational behavior.

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 structured into clear labeled sections and is front-loaded with purpose. It is slightly longer than strictly necessary, with minor redundancy between the first two sentences, but every major section adds useful operational context.

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 shape, error behavior, auth model, rate limiting, and safe usage context. For a simple one-parameter read-only lookup, nothing essential is missing for an agent to select and invoke the 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?

The input schema has 100% description coverage for the single parameter 'id' as 'User Id or email', so the schema already carries the semantic weight. The description only refers to 'the provided user id' without adding new format or constraint details, matching the baseline for full schema coverage.

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 ('Get user role of a user') and clearly defines what the tool returns, including assigned resources where applicable. It is immediately distinguishable from sibling tools like update_user_role_user and get_user_roles.

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?

The description explicitly says when to use it ('safe to call speculatively for lookups and reporting') and when not to ('Not for changing anything — use the matching 🟡 write tool'), and names related tools including the write alternative. This gives an agent clear 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