Skip to main content
Glama
Discord MCP - Discord server management MCP for AI agents

Discord MCP - Discord server management MCP for AI agents

Assign role

assign_role

Assigns a role to a Discord member after checking the bot's role hierarchy to prevent 403 errors, and requires confirmation for roles granting moderation, admin, or hidden-channel access.

Instructions

Give a member a role. Preflights the bot's role hierarchy so the failure mode is an explanation, not a 403. Supports dry_run. A role that would give the member moderator or admin powers (such as banning, kicking, or timing out members, deleting other people's messages, or managing the server, roles, or channels), or let them see channels hidden from them now, 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. Other roles are given at once.

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": {
      "member": "<member>",
      "role": "<role>"
    },
    "name": "assign_role"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleYesRole name or ID.
guildNoGuild (server) name or ID. Omit to use the default guild.
memberYesMember name or user ID.
reasonNoAudit log reason.
dry_runNoPreview without assigning.
confirm_tokenNoThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.4.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / confirm_token
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
  2. Changed1 schema field changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.0.2

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false and destructiveHint=false, so the description carries the real burden and does: it preflights the bot's role hierarchy so a permission problem surfaces as an explanation rather than a 403, discloses that the first confirming call is a no-op returning a preview and confirm_token, and warns which grants (moderator/admin-like powers, newly visible channels) trigger that gate. That is exactly the mutation-safety context an agent needs and cannot get from the annotations.

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?

Front-loaded with the action, then the preflight guarantee, then the conditional confirmation flow. The long parenthetical enumerating admin-capable permissions is dense but genuinely load-bearing for deciding whether the confirm path applies; the only waste is "Supports dry_run" sitting slightly apart from the confirmation explanation.

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 no output schema and thin annotations, the description must cover behavior and does so: mutation semantics, failure-mode handling, the two-step confirm protocol, and dry_run. Remaining gaps are minor (what the preview contains, idempotency on repeat calls, error shapes), but nothing an agent needs to choose and invoke the tool correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds workflow meaning the schema cannot: it ties dry_run and confirm_token into a sequence (first call changes nothing, repeat with the token to commit) rather than leaving them as two disconnected fields. It does not elaborate on guild defaulting or reason handling, which is why it is not a 5.

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

Purpose5/5

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

"Give a member a role" is a specific verb plus resource, and the surrounding sentences pin down the exact scope (single member, single role, optional guild) in a way that separates it from create_role, update_role, remove_role, and bulk_update_roles without the agent opening a schema.

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

Usage Guidelines4/5

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

It states the condition that splits the two code paths very concretely: privileged or channel-visibility-expanding roles need a preview-then-confirm round trip, everything else applies immediately, and dry_run exists for previewing. It stops short of naming a sibling to use instead or saying when not to use this at all (e.g. use bulk_update_roles for many members).

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

Deploy Server

Other Tools