Skip to main content
Glama

List Enrollments

list_enrollments
Read-only

List every enrollment the authenticated user holds across all of their Canvas courses — the caller's own enrollments only.

Instructions

List every enrollment the authenticated user holds across all of their Canvas courses — the caller's own enrollments only. Use list_course_enrollments for a single course's full roster, including a user_id filter to focus on one person. Optional type, state, and role filters and the include array mirror Canvas's own GET /users/self/enrollments endpoint. Fetches every page (100 per request) and fails with a 'Results are incomplete' error instead of silently truncating. When pseudonymization is enabled, each enrollment classified as student or unknown has its nested user object replaced with that course's pseudonym and sis_user_id cleared before the result is returned; staff enrollments (TeacherEnrollment, TaEnrollment, DesignerEnrollment) are left as-is.

Input Schema

NameRequiredDescriptionDefault
roleNoFilter by enrollment role names (as defined in the Canvas account)
typeNoFilter by one or more enrollment types
stateNoFilter by one or more enrollment states
includeNoExtra fields to include on each enrollment (Canvas include[] param)
grading_period_idNoReturn enrollments scoped to this grading period
enrollment_term_idNoLimit to enrollments in the given term

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv1.18.15
    • addedInput schema / properties / enrollment_term_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / enrollment_term_id / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / enrollment_term_id / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / enrollment_term_id / type
      Removed value: -"integer"
    • addedInput schema / properties / grading_period_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / grading_period_id / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / grading_period_id / minimum
      Removed value: --9007199254740991
    • removedInput schema / properties / grading_period_id / type
      Removed value: -"integer"
  2. Changed1 schema field changedv1.18.11
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observedv1.18.0

TDQS

A4.5/5.0
Behavior4/5

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

Adds substantial behavior beyond the readOnly/openWorld annotations: pagination is stated (100 per request), the failure mode is disclosed ('fails with a Results are incomplete error instead of silently truncating'), and the pseudonymization rule for nested user objects and sis_user_id is spelled out per enrollment type. The only minor gap is that it doesn't note permission or scope constraints beyond the 'own enrollments only' framing.

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?

Front-loads scope, then the alternative tool, then filters, then pagination/failure behavior, then the pseudonymization caveat — a clean priority order. Despite being a single long paragraph, every sentence carries decision-relevant information.

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?

For a read-only list tool with six optional filters and no output schema, the description covers scope, sibling choice, pagination limits, failure semantics, and the pseudonymization transform on return values. An agent has everything needed to call it correctly and interpret the results.

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 coverage is 100%, so per-parameter documentation is already complete. The description adds useful framing that type/state/role filters and the include array mirror Canvas's GET /users/self/enrollments, but says nothing about grading_period_id or enrollment_term_id, so it mostly defers to the schema. 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 (List) and resource (enrollments) plus precise scope: the authenticated caller's own enrollments across all their courses, explicitly 'not' a course roster. This immediately distinguishes it from list_course_enrollments without needing the schema.

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 the agent to the sibling: 'Use `list_course_enrollments` for a single course's full roster, including a `user_id` filter to focus on one person.' Both the when and the when-not are stated, leaving nothing to inference.

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

Deploy Server

Other Tools