put_groups_by_id
Calls PUT /api/groups/{id} as the signed-in person · REST reference
Update a group, without moving it between organizations
Requires execute:UpdateGroupCommand; platform staff bypass that gate, everyone else must belong to the group's org (403 GROUP_MODIFY_DENIED). orgId IS BLOCKED TWICE, both at 400 with different bodies: the validator rejects the key's mere presence with "Validation failed" and an array-shaped details, so the in-handler guard that answers with code: ORG_CHANGE_BLOCKED is only reachable if the validator is bypassed. Both preserve the single-organization model. Only name, description and type are copied onto the model. A body naming permissions is a 400: a group grants what its roles grant (PUT /api/org-admin/groups/{groupId}/roles).
Arguments
| Argument | Type | Description | |
|---|---|---|---|
idpath | string (uuid) | required | |
bodyJSON | object | required | The request body, as a JSON object. Its fields are listed below. |
Fields of body
| Field | Type | Description | |
|---|---|---|---|
description | string | ||
name | string | ||
orgId | string | Must be ABSENT. Its presence — even matching the group's current org — is a 400 from the validator. | |
type | "FUNCTIONAL" | "DEPARTMENTAL" | "ROLE_BASED" | "PROJECT" |
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_groups_by_id",
"arguments": {
"id": "11111111-1111-4111-8111-111111111111",
"body": {
"description": "string",
"name": "string",
"orgId": "string",
"type": "FUNCTIONAL"
}
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The updated group, wrapped in the success envelope with a message.
{
"data": {
"createdAt": "2026-01-15T12:00:00Z",
"id": "11111111-1111-4111-8111-111111111111",
"name": "string",
"status": "ACTIVE",
"type": "string",
"description": "string",
"memberCount": 1,
"orgId": "11111111-1111-4111-8111-111111111111",
"updatedAt": "2026-01-15T12:00:00Z"
},
"message": "string",
"success": true
}Fields
| Field | Type | Description |
|---|---|---|
data | object | The mutated Group model, echoed BEFORE the DAL entity is read back — fields the DAL ignored still appear here with the submitted value. |
data.createdAt | string (date-time) | |
data.description | string | null | |
data.id | string (uuid) | |
data.memberCount | integer | |
data.name | string | |
data.orgId | string (uuid) | null | |
data.status | "ACTIVE" | "INACTIVE" | "ARCHIVED" | |
data.type | string | |
data.updatedAt | string (date-time) | |
message | string | |
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.
400Validator rejection (bad
id, bad field, or anyorgIdkey) with an ARRAYdetails; or the in-handler org-change guard withcode: ORG_CHANGE_BLOCKED.403Missing
execute:UpdateGroupCommand, or the caller does not belong to the group's org (code: GROUP_MODIFY_DENIED).404No such group. Carries
code: GROUP_NOT_FOUND.409The DAL refused the change as the group stands: another group of the org has that name, or the change would retype an OWNER or MEMBER group. Carries the DAL's sentence.
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_groups_by_id",
"description": "PUT /api/groups/{id} — Requires `execute:UpdateGroupCommand`; platform staff bypass that gate, everyone else must belong to the group's org (403 `GROUP_MODIFY_DENIED`). `orgId` IS BLOCKED TWICE, both at 400 with different bodies: the validator rejects the key's mere presence with \"Validation failed\" and an array-shaped `details`, so the in-handler guard that answers with `code: ORG_CHANGE_BLOCKED` is only reachable if the validator is bypassed. Both preserve the single-organization model. Only `name`, `description` and `type` are copied onto the model. A body naming `permissions` is a 400: a group grants what its roles grant (`PUT /api/org-admin/groups/{groupId}/roles`).\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"body": {
"type": "string",
"description": "The JSON request body: { description: string; name: string; orgId: string (Must be ABSENT.); type: one of \"FUNCTIONAL\" | \"DEPARTMENTAL\" | \"ROLE_BASED\" | \"PROJECT\" }"
}
},
"required": [
"id",
"body"
]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": true,
"openWorldHint": false
}
}