---
title: "corestack_team_role_create"
url: https://docs.corefinity.com/mcp/tools/corestack_team_role_create
type: tool
last_updated: 2026-11-13
feature: team
related:
  - https://docs.corefinity.com/api/reference/organisation/create-custom-role.md
  - https://docs.corefinity.com/guides/organisation/people/users-and-invitations.md
---
# corestack_team_role_create

**Create a custom role.** Create a custom role for your company with a set of permissions you hold yourself. Scope: write.

- Scope: `write`
- Runs as a task: no

## When to use it

Create a custom role for your company that gives a set of permissions. You may only give permissions the person you act
for holds (corestack_team_permissions_list). Give it to people with corestack_team_member_role_attach. This is
`POST /api/roles/create`.

## Inputs

- `name` (string, up to 255 characters, required)
- `permissions` (array of strings, at least one, required): permission slugs.
- `scope` (integer, optional): always 4 (Custom); leave it out or send 4. It cannot be changed.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "name": {
      "maxLength": 255,
      "type": "string"
    },
    "permissions": {
      "description": "Permission slugs from corestack_team_permissions_list.",
      "items": {
        "maxLength": 255,
        "type": "string"
      },
      "minItems": 1,
      "type": "array"
    },
    "scope": {
      "description": "Optional. A custom role's scope is always 4 (Custom) and cannot be changed: leave it out, or send 4. Any other value is refused.",
      "type": "integer"
    }
  },
  "required": [
    "name",
    "permissions"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: only an owner may create roles.
- `invalid_arguments`: on `permissions`: "… is not a permission." for a name that is not one ("… is not a permission (it was removed)." for a retired one, such as `assignRoles`), or "You are not allowed to add … permission." for one you do not hold, or "… is a Corefinity staff permission: a company's custom role cannot hold it." for a staff permission, even one you hold; or on `name`.
- `invalid_arguments`: on `scope`: "A custom role's scope is always Custom and cannot be changed." for any integer other than 4. A non-integer gets the normal schema type error.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_team_role_create",
  "arguments": {
    "name": "Release managers",
    "permissions": ["viewWebsites", "deployEnvironments"]
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_team_role_create with name Release managers, permissions ["viewWebsites","deployEnvironments"]. (Create a custom role.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/roles/create](https://docs.corefinity.com/api/reference/organisation/create-custom-role.md)
- Guide: [Users and invitations](https://docs.corefinity.com/guides/organisation/people/users-and-invitations.md)
