move_student_to_class
Move a student to a new class, preserving all other enrollments. Optionally specify the current class to switch from, or omit to simply add a class.
Instructions
Switch a student from one class to another. Requires PS_ENABLE_WRITES.
SAFETY: Never call this tool or another class-staff/student-enrollment write in parallel. The student's full class list is replaced, so the server holds one global lock across the read, computation, and PUT within this process.
Applies both halves of the switch in a single request. The student's other classes are preserved. Omit from_section_id to add the new class while keeping every current one.
Args: school_id: School ID the classes belong to student_id: Student ID (from list_students) to_section_id: Class to move the student into (from list_classes) from_section_id: Class to move them out of (optional)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| school_id | Yes | ||
| student_id | Yes | ||
| to_section_id | Yes | ||
| from_section_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |