discord-mcp

Create role

discord_create_role

Write

Toolset
Roles roles
Discord permission
Manage Roles
Context cost
320 tokens, estimated1,281 bytes of definition, divided by 4

Create a new role in a server. Requires the Manage Roles permission; the new role is placed below the bot's highest role. Use discord_add_role to then assign it to members. Returns the new role's name and ID. To change an existing role, use discord_edit_role.

Risk and annotations

Read-onlyreadOnlyHintnoCan modify your server.
DestructivedestructiveHintnoDeclared non-destructive.
IdempotentidempotentHintnoRepeating the call can have an additional effect.
Open worldopenWorldHintyesInteracts with an external system: Discord.

Annotations are hints the server declares. Clients use them to decide when to ask you before a call.

Parameters

ParameterTypeRulesDescription
guild_idrequiredstring
pattern ^\d{17,20}$
Discord server (guild) ID (snowflake).
namerequiredstring
none
Name of the new role (max 100 characters).
coloroptionalstring
pattern ^#[0-9A-Fa-f]{6}$
Role color as a hex string, e.g. '#FF5733'.
hoistoptionalboolean
none
If true, display members with this role separately in the member list.
mentionableoptionalboolean
none
If true, anyone can @mention this role.
permissionsoptionalarray of strings or string
none
Server-wide permission flag names to grant, e.g. ['SendMessages','ViewChannel']. Uses Discord PermissionsBitField flag names.

Output

This tool declares no output schema. Its description says what it returns; this page shows no example rather than invent one.

Related tools

Named in its description

Also in Roles

Raw definition (1,281 bytes)
{
  "name": "discord_create_role",
  "description": "Create a new role in a server. Requires the Manage Roles permission; the new role is placed below the bot's highest role. Use discord_add_role to then assign it to members. Returns the new role's name and ID. To change an existing role, use discord_edit_role.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "guild_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "Discord server (guild) ID (snowflake)."
      },
      "name": {
        "type": "string",
        "description": "Name of the new role (max 100 characters)."
      },
      "color": {
        "description": "Role color as a hex string, e.g. '#FF5733'.",
        "type": "string",
        "pattern": "^#[0-9A-Fa-f]{6}$"
      },
      "hoist": {
        "description": "If true, display members with this role separately in the member list.",
        "type": "boolean"
      },
      "mentionable": {
        "description": "If true, anyone can @mention this role.",
        "type": "boolean"
      },
      "permissions": {
        "description": "Server-wide permission flag names to grant, e.g. ['SendMessages','ViewChannel']. Uses Discord PermissionsBitField flag names.",
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "required": [
      "guild_id",
      "name"
    ],
    "additionalProperties": false
  },
  "annotations": {
    "title": "Create role",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": false,
    "openWorldHint": true
  }
}