Skip to main content
Glama

get_user_roles

Read-onlyIdempotent

Retrieve all user roles from a LearnWorlds school, filtered by role ID or access level. Read-only lookup for reporting and access analysis.

Instructions

๐ŸŸข READ-ONLY ยท GET /v2/user-roles

Get all user roles. Returns a list with all the user roles of the school. The roles are in alphabetical ascending order according to their title.

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
role_idNoUnique identifier of the user role; use this query parameter to return a specific user role.
access_levelNoFilter roles by their access level. Values can be comma seperated to filter one or more access levels

Schema Changelog

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

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive hints, and the description adds substantial behavior beyond that: auth is injected server-side, calls are throttled under LearnWorlds' 30-per-10s cap and retried on 429/5xx, and non-2xx responses surface as tool errors with status and API error payload. This gives an agent realistic expectations for safety, failures, and throttling.

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 well-structured with labeled sections (Behavior, Returns, Use when) and every section adds practical information. It is longer than a minimal description, but the added length is justified by the lack of an output schema and the need to convey auth, rate limits, and error behavior.

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?

The description is complete for a read-only list tool with no output schema: it explains what it returns, the ordering of results, how errors appear, auth constraints, rate-limit behavior, and when it is safe to use. Nothing an agent needs to invoke or interpret this tool correctly is missing.

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 description coverage is 100%, so both role_id and access_level already have clear descriptions, examples, and enum values. The description does not add extra parameter-level semantics, but because the schema fully documents both parameters, the baseline score 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 opens with a specific verb and resource ('Get all user roles', 'GET /v2/user-roles') and clearly states scope: all user roles of the school, sorted alphabetically by title. This makes the tool's purpose unambiguous and distinct from sibling tools like get_user_role_user or get_user_groups.

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?

Explicitly says when to use it: 'safe to call speculatively for lookups and reporting.' It also states what not to use it for โ€” 'Not for changing anything โ€” use the matching ๐ŸŸก write tool' โ€” which gives clear routing guidance without ambiguity.

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