add_group_memberships
Bulk-add learners to a student group to grant course access through visibility overrides. Provide the group ID and learner IDs in a single batch operation.
Instructions
Add learners to a student group. This is a BATCH operation.
`id` is the group. `student_ids` are obfuscated learner ids.
IDEMPOTENT: adding someone who is already a member succeeds and reports them as
added. There is no "already a member" outcome, so a success here does not tell
you the group changed. Duplicates inside one batch are first-wins; the later
copies fail as `duplicate_in_batch`.
An unknown group is a not-found error regardless of what else is in the request,
so a failure here does not distinguish a bad group id from bad learner ids.
Adding a learner to a group can GRANT COURSE ACCESS, because visibility overrides
are attached to groups.
Requires the `student-groups:write` OAuth scope.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>",
"student_ids": "<student_ids>"
},
"name": "add_group_memberships"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| student_ids | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | Yes | ||
| total | Yes | ||
| failed | Yes | ||
| group_id | Yes | ||
| succeeded | Yes | ||
| student_ids | Yes |