channels_modify_permissions
Create or replace a role or user permission overwrite on a Discord channel to allow, deny, or restrict access and moderation actions.
Instructions
Purpose: Create or replace a permission overwrite for a role or user on a channel.
When to use: - Restrict a channel to a specific role; allow a moderator to manage messages.
When NOT to use: - Removing the overwrite entirely → use channels_delete_permissions.
type: 0 = role overwrite, 1 = member overwrite. allow/deny are stringified bitfields.
Returns: {updated, channel_id, overwrite_id}.
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>",
"overwrite_id": "<overwrite_id>",
"type": "<type>"
},
"name": "channels_modify_permissions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | Permission bitfield to deny (string of integer bits) | |
| type | Yes | 0 = role, 1 = member | |
| allow | No | Permission bitfield to allow (string of integer bits) | |
| channel_id | Yes | Channel whose overwrite is being set | |
| audit_reason | No | Reason recorded in audit log (X-Audit-Log-Reason header) | |
| overwrite_id | Yes | Role ID or user ID receiving the overwrite |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||