assign_role
Assign a Discord role to a user by user ID and role ID, with optional audit reason and server ID default.
Instructions
Assign a role to a user in the server
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": {
"userId": "<userId>",
"roleId": "<roleId>"
},
"name": "assign_role"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Audit log reason | |
| roleId | Yes | Role ID to assign | |
| userId | Yes | Target User ID | |
| guildId | No | Discord server ID (defaults to DISCORD_GUILD_ID) |