Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fuser-guides%2Fmcp-server%2Ftools%2Fcustom-roles.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fuser-guides%2Fmcp-server%2Ftools%2Fcustom-roles.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# Custom roles

Manage Coralogix [custom roles](https://docs-docusaurus.kinsta.page/user-guides/aaa/access-control/permissions/.md) directly from your AI agent. The Model Context Protocol (MCP) server provides a unified tool to create, retrieve, update, and delete custom roles, and to generate infrastructure-as-code definitions from role configurations.

## Tool[​](#tool "Direct link to Tool")

Use `manage_custom_roles` for all custom role operations.

| Action value          | Description                                                                                                                                                                                               |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `create`              | Create a new custom role with a name, description, parent role, and permissions.                                                                                                                          |
| `get`                 | Retrieve a specific custom role by ID.                                                                                                                                                                    |
| `list`                | List custom roles with an optional case-insensitive name filter.                                                                                                                                          |
| `update`              | Update an existing custom role without changing its parent role.                                                                                                                                          |
| `delete`              | Delete a custom role by ID.                                                                                                                                                                               |
| `generate_openapi`    | Generate the OpenAPI JSON payload for use with the Coralogix REST API.                                                                                                                                    |
| `generate_kubernetes` | Generate a Kubernetes Operator YAML manifest for the [Coralogix Operator](https://docs-docusaurus.kinsta.page/external/coralogix-operator).                                                               |
| `generate_terraform`  | Generate Terraform configuration for the [Coralogix Terraform Provider](https://docs-docusaurus.kinsta.page/developer-portal/infrastructure-as-code/terraform-provider/coralogix-terraform-provider/.md). |

## Example prompts[​](#example-prompts "Direct link to Example prompts")

### Create a custom role[​](#create-a-custom-role "Direct link to Create a custom role")

```
Create a Coralogix custom role named Observability Reader.

Use description "Read-only observability access", parent role Standard User,

and permission alerts:ReadConfig.
```

### List custom roles[​](#list-custom-roles "Direct link to List custom roles")

```
List Coralogix custom roles whose name contains "Observability".
```

### Update a custom role[​](#update-a-custom-role "Direct link to Update a custom role")

```
Update custom role <custom-role-id> by changing the description to

"Read-only observability and alerting access" and keeping the same parent role.
```

### Generate Terraform configuration[​](#generate-terraform-configuration "Direct link to Generate Terraform configuration")

```
Generate Terraform configuration for a custom role named Pipeline Manager with

description "Pipeline management role", parent role Standard User,

and permission spans.events2metrics:UpdateConfig. Do not create it.
```

## Important behaviors[​](#important-behaviors "Direct link to Important behaviors")

* **Parent role changes are not supported during update.** If you provide `parentRoleName` during update, it must match the current backend value.
* **Provide permissions.** The tool rejects empty or blank permission strings.
* **Custom role IDs are strings in Model Context Protocol payloads.** The server parses them to numeric IDs only when calling the role management API.
* **Update requires the current role shape.** Retrieve the current role, modify it, then update with the complete definition.
