discord_set_role_permission
Add or update per-channel permission overwrites for a role by allowing or denying specific permissions, merging with the role's existing overwrite instead of resetting it.
Instructions
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.
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": {
"channel_id": "<channel_id>",
"role_id": "<role_id>"
},
"name": "discord_set_role_permission"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Permission flag names to deny, e.g. ['SendMessages'] (or the same array JSON-encoded as a string). | |
| allow | No | Permission flag names to allow, e.g. ['SendMessages','ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names. | |
| reason | No | Optional reason recorded in the server audit log. | |
| role_id | Yes | ID (snowflake) of the role to grant/deny permissions for. | |
| channel_id | Yes | ID (snowflake) of the channel to set the overwrite on. |