discord-mcp

Set role channel permission

discord_set_role_permission

Write

Toolset
Permissions permissions
Discord permission
Manage Roles
Context cost
414 tokens, estimated1,657 bytes of definition, divided by 4

Add or update a per-channel permission overwrite for a role, allowing and/or denying specific permissions. Merges with the role's existing overwrite (does not reset it). Denying View Channel to @everyone on a channel also hides it from the bot, unless the bot has Administrator or a View Channel allow overwrite there, on its own member or on one of its roles. Grant that allow first, for example with discord_set_member_permission, then deny. Requires the Manage Roles permission. Use discord_set_member_permission to target a single member instead.

Risk and annotations

Read-onlyreadOnlyHintnoCan modify your server.
DestructivedestructiveHintnoDeclared non-destructive.
IdempotentidempotentHintyesRepeating the call with the same arguments has no additional effect.
Open worldopenWorldHintyesInteracts with an external system: Discord.

Annotations are hints the server declares. Clients use them to decide when to ask you before a call.

Parameters

ParameterTypeRulesDescription
channel_idrequiredstring
pattern ^\d{17,20}$
ID (snowflake) of the channel to set the overwrite on.
role_idrequiredstring
pattern ^\d{17,20}$
ID (snowflake) of the role to grant/deny permissions for.
allowoptionalarray of strings or string
none
Permission flag names to allow, e.g. ['SendMessages','ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names.
denyoptionalarray of strings or string
none
Permission flag names to deny, e.g. ['SendMessages'] (or the same array JSON-encoded as a string).
reasonoptionalstring
none
Optional reason recorded in the server audit log.

Output

This tool declares no output schema. Its description says what it returns; this page shows no example rather than invent one.

Related tools

Named in its description

Also in Permissions

Raw definition (1,657 bytes)
{
  "name": "discord_set_role_permission",
  "description": "Add or update a per-channel permission overwrite for a role, allowing and/or denying specific permissions. Merges with the role's existing overwrite (does not reset it). Denying View Channel to @everyone on a channel also hides it from the bot, unless the bot has Administrator or a View Channel allow overwrite there, on its own member or on one of its roles. Grant that allow first, for example with discord_set_member_permission, then deny. Requires the Manage Roles permission. Use discord_set_member_permission to target a single member instead.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "channel_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "ID (snowflake) of the channel to set the overwrite on."
      },
      "role_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "ID (snowflake) of the role to grant/deny permissions for."
      },
      "allow": {
        "description": "Permission flag names to allow, e.g. ['SendMessages','ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names.",
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "string"
          }
        ]
      },
      "deny": {
        "description": "Permission flag names to deny, e.g. ['SendMessages'] (or the same array JSON-encoded as a string).",
        "anyOf": [
          {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          {
            "type": "string"
          }
        ]
      },
      "reason": {
        "description": "Optional reason recorded in the server audit log.",
        "type": "string"
      }
    },
    "required": [
      "channel_id",
      "role_id"
    ],
    "additionalProperties": false
  },
  "annotations": {
    "title": "Set role channel permission",
    "readOnlyHint": false,
    "destructiveHint": false,
    "idempotentHint": true,
    "openWorldHint": true
  }
}