Skip to main content
Glama

list_courses

Retrieve Moodle courses available to the configured API token with filters for category, visibility, limit, and offset. Use it to discover course IDs and names before requesting detailed course data.

Instructions

List LMS courses available to the configured API token. Returns course ID, full name, short name, category, category path, and visibility. Supports filtering and pagination via categoryid, categoryname, visible, limit, and offset. When categoryname is used, it must match an existing category name exactly; if multiple categories share that name, the tool will ask for the ID instead of guessing. Use visible=false for hidden courses and visible=true for visible courses. Use limit and offset for subset requests like first 10 or first 50. Do not request the full course list unless the user explicitly asks for all courses. Use this to discover available courses before drilling into details. Prefer exact category IDs from list_categories when available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of courses to return
offsetNoNumber of courses to skip before returning results
visibleNoFilter by course visibility. false returns hidden courses; true returns visible courses.
categoryidNoFilter courses by category ID
categorynameNoFilter courses by exact category name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.5
    • changedInput schema / properties / limit / maximum
      Previous value: -200New value: +1500
    • addedInput schema / properties / visible
      Added value: +{
      +  "description": "Filter by course visibility. false returns hidden courses; true returns visible courses.",
      +  "type": "boolean"
      +}
  2. First observedv1.0.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations exist, so the description carries the burden: it discloses the return fields, the exact-match requirement for categoryname, and the disambiguation behavior (asks for ID rather than guessing) — genuinely useful behavior beyond structured fields. It omits auth/permission specifics (beyond 'configured API token') and any rate-limit or max-page guidance, keeping it short of a 5.

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?

Front-loaded with purpose and return shape, then filters, then usage guidance. Mostly every sentence earns its place, though limit/offset are explained twice (in the filter list and the 'first 10/first 50' sentence), a minor redundancy.

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?

With no output schema, the description supplies the return fields; with no annotations, it supplies usage and disambiguation rules. For a read-only list tool with 5 optional params, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real semantics: categoryname must match exactly and how ambiguity is resolved, the meaning of visible=true/false, and concrete limit/offset examples ('first 10 or first 50'). It does not restate the 1500 max.

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 LMS courses') scoped to the configured API token, and enumerates the returned fields. The mention of list_categories and get_course lets an agent place it among siblings without opening schemas.

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?

Explicit when-to-use ('discover available courses before drilling into details'), when-not ('Do not request the full course list unless the user explicitly asks for all courses'), and an alternative ('Prefer exact category IDs from list_categories'). Filtering intent for visible and limit/offset is spelled out.

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