Skip to main content
Glama

discord_set_role_icon

Idempotent

Sets or clears a Discord role's icon using a custom image URL or unicode emoji; requires server Boost Level 2+ and Manage Roles permission.

Instructions

Set or clear a role's icon, either a custom image or a unicode emoji. Requires the server to be Boost Level 2+ (the ROLE_ICONS feature) and the Manage Roles permission. Pass null to either field to remove that icon. Returns a confirmation.

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_set_role_icon"
  }
}

Input Schema

NameRequiredDescriptionDefault
iconNoImage URL for the role icon, or null to remove it.
role_idYesID (snowflake) of the role to set the icon on.
guild_idYesDiscord server (guild) ID (snowflake).
unicode_emojiNoUnicode emoji to use as the role icon, or null to remove it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.1
    • removedInput schema / properties / unicode_emoji / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedInput schema / properties / unicode_emoji / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed6 schema fields changedv2.0.0
    • addedInput schema / properties / guild_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / icon / anyOf
      Added value: +[
      +  {
      +    "anyOf": [
      +      {
      +        "format": "uri",
      +        "pattern": "^https?://",
      +        "type": "string"
      +      },
      +      {
      +        "const": "null",
      +        "type": "string"
      +      }
      +    ]
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / icon / type
      Removed value: -"string"
    • addedInput schema / properties / role_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / unicode_emoji / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / unicode_emoji / type
      Removed value: -"string"
  4. Changed4 schema fields changedv1.6.0
    • addedInput schema / properties / guild_id / description
      Added value: +"Discord server (guild) ID (snowflake)."
    • changedInput schema / properties / icon / description
      Previous value: -"Image URL for the role icon. Set to null to remove."New value: +"Image URL for the role icon, or null to remove it."
    • addedInput schema / properties / role_id / description
      Added value: +"ID (snowflake) of the role to set the icon on."
    • changedInput schema / properties / unicode_emoji / description
      Previous value: -"Unicode emoji for the role. Set to null to remove."New value: +"Unicode emoji to use as the role icon, or null to remove it."
  5. Addedv1.5.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint=false, idempotentHint=true, destructiveHint=false, openWorldHint=true), and the description adds environment preconditions and the clearing behavior that annotations cannot express. 'Returns a confirmation' is a useful hint given no output schema exists. It does not address rate limits or what happens if both icon fields are supplied at once.

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

Conciseness4/5

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

Three short sentences, front-loaded with the action before prerequisites and the removal rule. 'Returns a confirmation' is thin but brief; nothing is padded.

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

Completeness4/5

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

For a 4-parameter idempotent mutation tool with full annotation coverage and no output schema, the description covers action, prerequisites, clearing semantics and response type. The main residual gap is the interaction between the two icon fields.

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 role_id, guild_id, icon and unicode_emoji are already documented, and the null-to-remove note duplicates the schema text almost verbatim. The description hints at mutual exclusivity ('either a custom image or a unicode emoji') but never resolves whether both fields may be passed simultaneously, leaving the one genuinely ambiguous aspect unaddressed.

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?

States a specific verb pair (set or clear) and resource (a role's icon), plus the two accepted icon kinds (custom image URL or unicode emoji). An agent understands the operation without opening the schema, though it never distinguishes itself from siblings like discord_edit_role or discord_delete_role that could also touch role appearance.

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

Usage Guidelines4/5

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

Gives concrete prerequisites (Boost Level 2+ / ROLE_ICONS feature, Manage Roles permission) and explains the removal path ('Pass null to either field'). It stops short of naming an alternative tool or saying when to prefer this over editing the role through discord_edit_role.

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