Give or remove a role
set_member_rolesUse this when the user wants to give a role to members or take it from them (roles with moderation or admin permissions are refused). Do not use for editing the role itself; use edit_role. Adds the change to the pending card for this server; nothing changes on Discord until apply_card.
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": {
"guild_id": "<guild_id>",
"role": "<role>",
"members": "<members>"
},
"name": "set_member_roles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | The role name. | |
| action | No | add by default. | |
| members | Yes | Members: display name, username or mention. | |
| guild_id | Yes | Discord server ID, as returned by list_my_servers. |