Roles
Custom RBAC roles.
4 actions. Each is callable by the agent as a tool, over HTTP via /api/invoke, and (usually) from a UI page.
roles.list
GET
List the workspace's custom roles (system roles are built-in and not stored).
- AI tool:
roles_list - API:
GET /api/invoke/roles.list
Input
No parameters.
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {}
}roles.create
POST · mutating
Create a custom role (name, description, color, icon, permissions, inheritance, AI flag).
- AI tool:
roles_create - API:
POST /api/invoke/roles.create
Input
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
description |
string | — | |
color |
string | — | |
icon |
string | — | |
permissions |
string[] | — | |
inheritsFrom |
union | — | |
isAiRole |
boolean | — | |
maxMembers |
union | — |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"color": {
"type": "string"
},
"icon": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"inheritsFrom": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"isAiRole": {
"type": "boolean"
},
"maxMembers": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
},
"required": [
"name"
]
}roles.update
PATCH · mutating
Update a custom role.
- AI tool:
roles_update - API:
PATCH /api/invoke/roles.update
Input
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | |
patch |
object | yes |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"patch": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"color": {
"type": "string"
},
"icon": {
"type": "string"
},
"permissions": {
"type": "array",
"items": {
"type": "string"
}
},
"inheritsFrom": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"isAiRole": {
"type": "boolean"
},
"maxMembers": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
}
}
}
},
"required": [
"id",
"patch"
]
}roles.delete
DELETE · mutating
Delete a custom role.
- AI tool:
roles_delete - API:
DELETE /api/invoke/roles.delete
Input
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1
}
},
"required": [
"id"
]
}