Skip to main content
Glama
lburnscissp

discord-mcp

by lburnscissp

discord_set_member_role

Idempotent

Add or remove a Discord server role from a member by user ID and role ID, optionally recording a reason in the audit log.

Instructions

Give a role to a member, or take it away.

Needs Manage Roles, and the bot's own top role must sit above the role being assigned.

Returns: Confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoadd
reasonNoReason recorded in the server's audit log.
role_idYesRole to add or remove (find with discord_list_roles).
user_idYes
guild_idNoServer (guild) ID. Omit to use DISCORD_GUILD_ID from .env.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the safety profile is partly covered. The description adds meaningful context beyond them: the required Manage Roles permission and the role-hierarchy constraint. It does not describe side effects or audit-log behavior, but the auth requirements are a solid addition.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short, front-loaded sentences with no filler, and the core purpose leads. 'Returns: Confirmation.' is minimal and largely redundant given an output schema exists, which trims a point.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present the description need not explain return values, and annotations cover the mutation/idempotency profile. The permission and hierarchy prerequisites are the key operational detail an agent needs, so coverage is largely complete, with only the action/undo semantics left partly implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 60% (action and user_id are undocumented there). The description maps 'give a role / take it away' to the add/remove action enum and the role_id target, adding some meaning over the schema. But it says nothing about user_id or guild_id resolution, so it only partially compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Give a role to a member, or take it away'), clearly stating that it manages member-role assignment rather than editing the role object itself. It is distinguishable from discord_edit_role/discord_delete_role, though it never names a sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the prerequisite permissions ('Needs Manage Roles, and the bot's own top role must sit above the role being assigned'), which is useful for deciding whether the call can succeed. However, it gives no when-to-use/when-not guidance and never points to an alternative tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.