discord-mcp

Edit role

discord_edit_role

Write

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

Update an existing role's name, color, permissions, hoist, or mentionable flag. Only provided fields change; passing permissions REPLACES the role's full permission set, and passing color sets a single solid color, removing any gradient or holographic colors. Requires the Manage Roles permission, and the role must be below the bot's highest role.

Risk and annotations

Read-onlyreadOnlyHintnoCan modify your server.
DestructivedestructiveHintnoDeclared non-destructive.
IdempotentidempotentHintyesRepeating the call with the same arguments has no 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).
role_idrequiredstring
pattern ^\d{17,20}$
ID (snowflake) of the role to edit.
nameoptionalstring
none
New role name (max 100 characters).
coloroptionalstring
pattern ^#[0-9A-Fa-f]{6}$
New 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
Permission flag names. Providing this REPLACES the role's entire permission set. 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

Also in Roles

Raw definition (1,470 bytes)
{
  "name": "discord_edit_role",
  "description": "Update an existing role's name, color, permissions, hoist, or mentionable flag. Only provided fields change; passing permissions REPLACES the role's full permission set, and passing color sets a single solid color, removing any gradient or holographic colors. Requires the Manage Roles permission, and the role must be below the bot's highest role.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "guild_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "Discord server (guild) ID (snowflake)."
      },
      "role_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "ID (snowflake) of the role to edit."
      },
      "name": {
        "description": "New role name (max 100 characters).",
        "type": "string"
      },
      "color": {
        "description": "New 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": "Permission flag names. Providing this REPLACES the role's entire permission set. Uses Discord PermissionsBitField flag names.",
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "string"
          }
        ]
      }
    },
    "required": [
      "guild_id",
      "role_id"
    ],
    "additionalProperties": false
  },
  "annotations": {
    "title": "Edit role",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": true
  }
}