Skip to main content
Glama

discord_create_role

Create a new role in a Discord server with custom name, color, permissions, and display settings to organize members and manage access.

Instructions

Create a new role in a guild.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
nameYes
colorNoHex color e.g. #FF5733
hoistNo
mentionableNo
permissionsNoe.g. ['SendMessages','ViewChannel']

Implementation Reference

  • The handler logic for "discord_create_role" which interacts with the discord.js library to create a role in a guild.
    case "discord_create_role": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const perms = parsePerms(args.permissions);
      const role = await guild.roles.create({
        name: args.name as string,
        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}" created (id: ${role.id}).` }] };
    }
  • The MCP tool definition (schema) for "discord_create_role".
    {
      name: "discord_create_role",
      description: "Create a new role in a guild.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          name: { type: "string" },
          color: { type: "string", description: "Hex color e.g. #FF5733" },
          hoist: { type: "boolean" },
          mentionable: { type: "boolean" },
          permissions: { type: "array", items: { type: "string" }, description: "e.g. ['SendMessages','ViewChannel']" },
        },
        required: ["guild_id", "name"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool creates a role but lacks details on permissions required (e.g., 'MANAGE_ROLES'), rate limits, whether the action is reversible, or what happens on failure (e.g., error responses). This is inadequate for a mutation tool with potential side effects in a guild.

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, direct sentence with no wasted words, making it easy to parse. It's front-loaded with the core action and resource, though it could benefit from additional context without sacrificing brevity. This is an example of efficient communication.

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?

Given the complexity (a mutation tool with 6 parameters, no annotations, and no output schema), the description is incomplete. It doesn't cover behavioral aspects like authentication needs, error handling, or return values, leaving significant gaps for an agent to invoke the tool correctly in a Discord guild context.

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 33% (2 out of 6 parameters have descriptions: 'color' and 'permissions'), so the description must compensate but doesn't add any parameter details beyond the schema. It implies parameters like 'guild_id' and 'name' are needed but provides no extra context (e.g., format for 'guild_id' or constraints for 'name'). Baseline 3 is appropriate as the schema does some work, but the description adds no value.

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 ('Create') and resource ('new role in a guild'), making the purpose immediately understandable. It distinguishes from siblings like 'discord_edit_role' or 'discord_delete_role' by specifying creation rather than modification or deletion. However, it doesn't explicitly differentiate from other creation tools (e.g., 'discord_create_channel'), though the resource specificity helps.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing admin permissions), compare it to similar tools like 'discord_edit_role' for updates, or specify use cases (e.g., setting up moderation roles). This leaves the agent without context for selection among the many Discord management tools.

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