Skip to main content
Glama

discord_edit_role

Modify Discord server roles by updating name, color, permissions, visibility, and mention settings to manage member access and organization.

Instructions

Edit an existing role (name, color, permissions, hoist, mentionable).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
role_idYes
nameNo
colorNo
hoistNo
mentionableNo
permissionsNo

Implementation Reference

  • The handler case for 'discord_edit_role' that fetches the guild and role, then applies the updates using the discord.js edit method.
    case "discord_edit_role": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const role = await guild.roles.fetch(args.role_id as string) as Role;
      const perms = parsePerms(args.permissions);
      await role.edit({
        name: args.name as string | undefined,
        color: args.color as ColorResolvable | undefined,
        hoist: args.hoist as boolean | undefined,
        mentionable: args.mentionable as boolean | undefined,
        permissions: perms
          ? new PermissionsBitField(perms.map((p) => PermissionsBitField.Flags[p as keyof typeof PermissionsBitField.Flags]))
          : undefined,
      });
      return { content: [{ type: "text", text: `✅ Role "${role.name}" updated.` }] };
    }
  • The input schema definition for 'discord_edit_role'.
      name: "discord_edit_role",
      description: "Edit an existing role (name, color, permissions, hoist, mentionable).",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          role_id: { type: "string" },
          name: { type: "string" },
          color: { type: "string" },
          hoist: { type: "boolean" },
          mentionable: { type: "boolean" },
          permissions: { type: "array", items: { type: "string" } },
        },
        required: ["guild_id", "role_id"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool edits a role but doesn't mention required permissions, whether changes are reversible, rate limits, error conditions, or what happens to unspecified fields. For a mutation tool with 7 parameters and no annotation coverage, this leaves significant behavioral gaps.

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?

The description is a single, efficient sentence that front-loads the core action and enumerates modifiable attributes. Every word serves a purpose with zero waste or redundancy. It's appropriately sized for the tool's complexity.

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

Completeness2/5

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

For a mutation tool with 7 parameters, no annotations, and no output schema, the description is incomplete. It covers the basic purpose and some parameters but lacks behavioral context, permission requirements, error handling, and output expectations. The agent would need to guess about many operational aspects.

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 description coverage is 0%, so the description must compensate. It successfully lists 5 of the 7 parameters (name, color, permissions, hoist, mentionable) and implies their purpose in role editing. However, it doesn't mention the two required parameters (guild_id, role_id) or provide format details for any parameters. The description adds meaningful context but doesn't fully document all parameters.

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

Purpose4/5

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

The description clearly states the action ('Edit') and target resource ('an existing role'), and lists the specific attributes that can be modified (name, color, permissions, hoist, mentionable). It distinguishes from sibling tools like discord_create_role and discord_delete_role by focusing on modification rather than creation or deletion. However, it doesn't explicitly differentiate from other edit tools like discord_edit_channel or discord_edit_message.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing admin permissions), when not to use it, or how it relates to similar tools like discord_set_role_permission. The agent must infer usage from the tool name and parameter list alone.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaSympa/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server