Skip to main content
Glama

list_user_courses

Retrieves all Moodle courses for a specific user ID, enabling admins to review a learner's enrolled courses. Use exact user IDs from get_user or search_users lookups.

Instructions

List courses for a specific Moodle user ID. Requires an exact userid. Use get_user for exact email or username lookups first. Use search_users when a person is identified by name and multiple matches are possible. If multiple people match, ask the operator to choose the correct userid before calling this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_siloNoINTERNAL: Silo filter injected by agent-edge. Not for direct use.
limitNoMaximum courses to return
offsetNoPagination offset
useridYesExact Moodle user ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • addedInput schema / properties / _silo
      Added value: +{
      +  "description": "INTERNAL: Silo filter injected by agent-edge. Not for direct use.",
      +  "properties": {
      +    "field": {
      +      "type": "string"
      +    },
      +    "value": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "field",
      +    "value"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the critical precondition (exact userid) and the disambiguation workflow, which is valuable. However, it does not mention pagination behavior (despite limit/offset params) or what happens with an invalid userid, leaving some behavioral gaps for a tool with zero annotation coverage.

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?

Four tight sentences, front-loaded with the core action, then prerequisites and disambiguation steps in a logical order. Every sentence earns its place with no redundancy.

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

Completeness4/5

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

The precondition and disambiguation guidance make the definition usable without opening sibling schemas, which is strong for a lookup tool. It stops short of describing pagination or error behavior for an invalid userid, but for this tool's complexity and with a fully documented schema, it is nearly complete.

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 the schema already documents userid, limit, offset, and _silo with descriptions and constraints. The description reinforces that userid must be exact, which adds marginal value, but does not explain pagination semantics beyond what the schema provides. Baseline 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?

States a specific verb+resource (list courses) with a precise scope (a specific Moodle user ID) and distinguishes itself from siblings list_courses and list_course_users. The requirement of an exact userid is stated immediately.

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 routes to get_user for email/username lookups and to search_users for name-based lookups, and instructs the agent to ask the operator to choose a userid when multiple matches exist. This is a model example of when-to-use and what-to-do-when-ambiguous guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.