Skip to main content
Glama

discord_create_role

Create a new role in a Discord server with custom color, permissions, and mention settings. Requires Manage Roles and returns the new role's name and ID for assignment.

Instructions

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.

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>",
      "name": "<name>"
    },
    "name": "discord_create_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesName of the new role (max 100 characters).
colorNoRole color as a hex string, e.g. '#FF5733'.
hoistNoIf true, display members with this role separately in the member list.
guild_idYesDiscord server (guild) ID (snowflake).
mentionableNoIf true, anyone can @mention this role.
permissionsNoServer-wide permission flag names to grant, e.g. ['SendMessages','ViewChannel']. 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. Changed5 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"
  4. Changed6 schema fields changedv1.6.0
    • changedInput schema / properties / color / description
      Previous value: -"Hex color e.g. #FF5733"New value: +"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: +"Name of the new role (max 100 characters)."
    • changedInput schema / properties / permissions / description
      Previous value: -"e.g. ['SendMessages','ViewChannel']"New value: +"Server-wide permission flag names to grant, e.g. ['SendMessages','ViewChannel']. Uses Discord PermissionsBitField flag names."
  5. Addedv1.5.0
  6. Removedv1.0.0
  7. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, non-destructive, open-world behavior. The description adds genuinely new context the annotations cannot carry: the required permission, the role-hierarchy placement rule that silently affects the outcome, and the return payload (name and ID) in the absence of an output schema. Minor gap: no mention of what happens on name collision or duplicate role names.

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?

Four short sentences, each carrying distinct information: what it does, the permission and hierarchy constraints, the follow-up tool, the return value, and the alternative tool. Front-loaded with the core action and zero filler.

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 6-parameter mutation tool with no output schema, the definition covers permissions, positional side effects, return values, and routing to siblings. Nothing an agent needs in order to call this correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema itself documents name length, the hex color pattern, hoist, mentionable, guild_id format, and the permissions flag format. The description adds no parameter-level meaning beyond that, which is the expected baseline when the schema does the work.

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?

States a specific verb and resource ("Create a new role in a server") and explicitly distinguishes itself from both siblings that operate on roles: discord_add_role for assignment and discord_edit_role for modification. An agent can route correctly 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?

Gives explicit preconditions (Manage Roles permission), an operational constraint (new role sits below the bot's highest role), and names the follow-up and alternative tools with their respective conditions. When-to-use and when-not-to-use are both covered.

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