Skip to main content
Glama

discord_edit_role

DestructiveIdempotent

Update an existing Discord role's name, color, permissions, hoist, or mentionable status; only provided fields change, and supplied permissions replace the role's full permission set.

Instructions

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. These permissions apply server-wide; for one channel, use discord_set_role_permission. Use discord_set_role_position to move the role, discord_set_role_icon for its icon, or discord_create_role for a new role.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "guild_id": "<guild_id>",
      "role_id": "<role_id>"
    },
    "name": "discord_edit_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoNew role name (max 100 characters).
colorNoNew role color as a hex string, e.g. '#FF5733'.
hoistNoIf true, display members with this role separately in the member list.
role_idYesID (snowflake) of the role to edit.
guild_idYesDiscord server (guild) ID (snowflake).
mentionableNoIf true, anyone can @mention this role.
permissionsNoPermission flag names. Providing this REPLACES the role's entire permission set. Uses Discord PermissionsBitField flag names.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / name / maxLength
      Added value: +100
  2. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed6 schema fields changedv2.0.0
    • addedInput schema / properties / color / pattern
      Added value: +"^#[0-9A-Fa-f]{6}$"
    • addedInput schema / properties / guild_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / permissions / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / permissions / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / permissions / type
      Removed value: -"array"
    • addedInput schema / properties / role_id / pattern
      Added value: +"^\\d{17,20}$"
  4. Changed7 schema fields changedv1.6.0
    • addedInput schema / properties / color / description
      Added value: +"New role color as a hex string, e.g. '#FF5733'."
    • addedInput schema / properties / guild_id / description
      Added value: +"Discord server (guild) ID (snowflake)."
    • addedInput schema / properties / hoist / description
      Added value: +"If true, display members with this role separately in the member list."
    • addedInput schema / properties / mentionable / description
      Added value: +"If true, anyone can @mention this role."
    • addedInput schema / properties / name / description
      Added value: +"New role name (max 100 characters)."
    • addedInput schema / properties / permissions / description
      Added value: +"Permission flag names. Providing this REPLACES the role's entire permission set. Uses Discord PermissionsBitField flag names."
    • addedInput schema / properties / role_id / description
      Added value: +"ID (snowflake) of the role to edit."
  5. Addedv1.5.0
  6. Removedv1.0.0
  7. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructiveHint=true and idempotentHint=true, but the description goes further: it explains partial-update semantics ('Only provided fields change'), that permissions REPLACES the full set, that color wipes gradients/holographic colors, and the authorization/hierarchy requirements. This is exactly the context an agent needs before a destructive mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the mutation scope, then the destructive caveats, then the sibling routing. Every clause carries distinct information and none is redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter mutation tool with no output schema, the description covers scope, destructive side effects, prerequisites, and alternatives. Nothing needed to invoke it safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: color assignment destroys existing gradient/holographic colors, and permissions are server-wide rather than channel-scoped. It stops short of explaining the permissions flag-name format beyond what the schema already says, so it is not a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb+resource ('Update an existing role') and enumerates exactly which fields can change (name, color, permissions, hoist, mentionable). An agent can distinguish this from discord_create_role, discord_set_role_position, and discord_set_role_permission without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes sibling cases: 'for one channel, use discord_set_role_permission', and names discord_set_role_position, discord_set_role_icon, and discord_create_role with their respective purposes. Prerequisites (Manage Roles permission, role hierarchy position) are also stated, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools