canvas_list_enrollments
List course enrollments to get the enrollment_id required for modifying or removing a user. Use this before changing enrollment records to avoid targeting the wrong user or receiving a 404.
Instructions
List enrollments, including the enrollment_id needed to change one.
canvas_list_students returns users; removing or modifying somebody needs the enrollment id, which is a different number. Fetch it here first — passing a user id to canvas_remove_enrollment silently targets the wrong record or 404s.
Args: course_id: numeric course id; defaults to CANVAS_DEFAULT_COURSE_ID. role: StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, DesignerEnrollment. Empty for all. state: active, invited, concluded, completed, inactive. Empty for all.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "canvas_list_enrollments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | No | ||
| state | No | active | |
| course_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |