put_org_admin_groups_by_groupid_roles
Calls PUT /api/org-admin/groups/{groupId}/roles as the signed-in person · REST reference
Set exactly which of the organization's roles a group carries
With the caller's own token. Requires admin.groups.permissions in the GROUP's organization. roleIds is the COMPLETE set. Refused (409) for the organization's OWNER and MEMBER groups, refused (400) for a role of another organization or a built-in role, and refused (403) for a role granting anything the caller does not hold in the organization.
Arguments
| Argument | Type | Description | |
|---|---|---|---|
groupIdpath | string (uuid) | required | |
bodyJSON | object | required | The request body, as a JSON object. Its fields are listed below. |
Fields of body
| Field | Type | Description | |
|---|---|---|---|
roleIds | array of string (uuid) | required |
Example call
A client sends this over the MCP session; Claude and other agents build it for you. The values are placeholders — the shape is real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "put_org_admin_groups_by_groupid_roles",
"arguments": {
"groupId": "11111111-1111-4111-8111-111111111111",
"body": {
"roleIds": [
"11111111-1111-4111-8111-111111111111"
]
}
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The group's roles were set.
{
"data": {
"rolesAdded": [
"11111111-1111-4111-8111-111111111111"
],
"rolesRemoved": [
"11111111-1111-4111-8111-111111111111"
]
},
"success": true
}Fields
| Field | Type | Description |
|---|---|---|
data | object | |
data.rolesAdded | array of string (uuid) | |
data.rolesRemoved | array of string (uuid) | |
success | true |
When it fails
A failed call returns isError: true with the API's message as text. A change the person declines, or lets time out, also comes back this way and nothing changes.
400The request was malformed or failed a guard.
403No
admin.groups.permissionsin the group's organization, or a role would grant a permission the caller does not hold there (the message names it).404No such resource — or none this caller may see.
409The resource is not in a state that allows this operation.
What the model is shown
This is the tool exactly as the server lists it in tools/list. The description starts with the REST call it makes.
{
"name": "put_org_admin_groups_by_groupid_roles",
"description": "PUT /api/org-admin/groups/{groupId}/roles — With the caller's own token. Requires `admin.groups.permissions` in the GROUP's organization. `roleIds` is the COMPLETE set. Refused (409) for the organization's OWNER and MEMBER groups, refused (400) for a role of another organization or a built-in role, and refused (403) for a role granting anything the caller does not hold in the organization.\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
"inputSchema": {
"type": "object",
"properties": {
"groupId": {
"type": "string"
},
"body": {
"type": "string",
"description": "The JSON request body: { roleIds*: array of string }"
}
},
"required": [
"groupId",
"body"
]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": true,
"openWorldHint": false
}
}