patch_org_admin_roles_by_roleid
Calls PATCH /api/org-admin/roles/{roleId} as the signed-in person · REST reference
Rename an organization role, or set exactly which of its organization's permissions it grants
Sent to the DAL with the caller's own token. Requires admin.roles.manage in the ROLE's organization. orgPermissionIds is the COMPLETE set (omit to leave grants alone, [] to revoke all); every id must be the role's organization's, and every permission ADDED must be one the caller holds there. The built-in OWNER and ORG_USER roles are not editable (409).
Arguments
| Argument | Type | Description | |
|---|---|---|---|
roleIdpath | 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 | Letters, digits and underscores, 2-50 characters (the DAL's rule). | |
orgPermissionIds | array of string (uuid) |
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": "patch_org_admin_roles_by_roleid",
"arguments": {
"roleId": "11111111-1111-4111-8111-111111111111",
"body": {
"description": "string",
"name": "string",
"orgPermissionIds": [
"11111111-1111-4111-8111-111111111111"
]
}
}
}
}Result
On success (HTTP 200) the tool returns one text item holding the API's JSON, pretty-printed.
The role was updated.
{
"data": {
"id": "11111111-1111-4111-8111-111111111111",
"name": "string"
},
"success": true
}Fields
| Field | Type | Description |
|---|---|---|
data | object | |
data.id | string (uuid) | |
data.name | 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.
400The request was malformed or failed a guard.
403The caller does not hold
admin.roles.managein the role's organization, or would grant a permission they do 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": "patch_org_admin_roles_by_roleid",
"description": "PATCH /api/org-admin/roles/{roleId} — Sent to the DAL with the caller's own token. Requires `admin.roles.manage` in the ROLE's organization. `orgPermissionIds` is the COMPLETE set (omit to leave grants alone, [] to revoke all); every id must be the role's organization's, and every permission ADDED must be one the caller holds there. The built-in OWNER and ORG_USER roles are not editable (409).\n\nThis changes data. The person is asked to confirm it before it runs, and nothing happens if they decline.",
"inputSchema": {
"type": "object",
"properties": {
"roleId": {
"type": "string"
},
"body": {
"type": "string",
"description": "The JSON request body: { description: string; name: string (Letters, digits and underscores, 2-50 characters (the DAL's rule).); orgPermissionIds: array of string }"
}
},
"required": [
"roleId",
"body"
]
},
"annotations": {
"readOnlyHint": false,
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": false
}
}