Set channel permissions
set_channel_permissionsSet a channel permission overwrite for a role or member, specifying allowed and denied permissions. Replaces the existing overwrite, and previews sensitive changes until you confirm them with a token.
Instructions
Set a permission overwrite on a channel for one role or member: which permissions are explicitly allowed and which are denied. It replaces that role's or member's whole overwrite on the channel, so list every permission it should keep, not only the new one; get_channel_permissions shows the current one. Permission names like manage_messages or send_messages. On a category, Discord also makes the same change in every channel inside whose permissions match the category's exactly (synced), as the Discord app does; the result names them. To keep such a channel as it is, change that channel first, which stops it matching. get_channel_permissions says whether a channel is synced. A change that would let someone see a channel they cannot see now, or give them moderator or admin powers (such as banning, kicking, or timing out members, deleting other people's messages, or managing the server, roles, or channels) there, needs confirming: the first call changes nothing and returns a preview and a confirm_token, and repeating the call with the token makes the change.
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": "<channel>",
"target": "<target>"
},
"name": "set_channel_permissions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Permissions to deny. | |
| allow | No | Permissions to allow. | |
| guild | No | Guild (server) name or ID. Omit to use the default guild. | |
| target | Yes | Role or member name or ID. | |
| channel | Yes | Channel name or ID. | |
| confirm_token | No | The token from this exact action's preview. Where the app can show a confirmation dialog, calling with it asks the user there, and it happens only if they agree. |