Skip to main content
Glama

list_my_courses

Retrieve the list of courses where a specified Moodle user is enrolled. Pass the user ID to get results, with optional limit and hidden-course filters.

Instructions

List courses where a user is enrolled. Accepts userid (e.g. obtain from get_site_info for the bot, or pass a student_id-mapped Moodle userid).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
useridYesMoodle user id whose courses to list. Use get_site_info / core_webservice_get_site_info to find the bot user id.
only_visibleNoIf true, filter out hidden (archived) courses.
Behavior2/5

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

No annotations are provided, so the description must stand alone. It states what the tool does but does not disclose behaviors like whether hidden courses are included by default (only_visible defaults to false in the schema), pagination, or rate limits. The schema provides some parameter details, but the description itself is minimal and does not add behavioral context.

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 a single sentence with no wasted words. It front-loads the purpose and includes a useful parenthetical, making it both concise and well-structured.

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

Completeness3/5

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

The description is sufficient for a simple listing tool, but it lacks details on return structure, pagination, and the meaning of limit. Since there is no output schema and annotations are absent, the description could be more informative to fully guide an agent.

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 description adds a note on userid sources ('obtain from get_site_info for the bot, or pass a student_id-mapped Moodle userid'), which supplements the schema's userid description. However, it does not explain the limit parameter at all, and only_visible is already described in the schema. With schema coverage at 67%, the description provides partial added value.

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 clearly states the tool's function: 'List courses where a user is enrolled.' The verb 'list' and resource 'courses' are specific, and the scope (for a given userid) distinguishes it from sibling tools like list_students or get_course_context.

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

Usage Guidelines4/5

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

The description gives clear context on when to use the tool by specifying it lists courses for a specific user, and provides a useful hint on obtaining the userid from get_site_info. It doesn't explicitly name alternatives or state when not to use it, so it stops short of a 5.

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/sernobre/moodle-mcp-sernobre'

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