Skip to main content
Glama

discord_set_role_position

Idempotent

Moves a Discord role up or down in the server role hierarchy to set permission precedence and member-list order; requires Manage Roles and a position below the bot's highest role.

Instructions

Move a role up or down in the server's role hierarchy, which determines permission precedence and member-list ordering. Higher position = higher in the list. Requires the Manage Roles permission, and the target position must be below the bot's highest role. To change the role's name, color or permissions, use discord_edit_role.

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_id": "<role_id>",
      "position": "<position>"
    },
    "name": "discord_set_role_position"
  }
}

Input Schema

NameRequiredDescriptionDefault
role_idYesID (snowflake) of the role to reposition.
guild_idYesDiscord server (guild) ID (snowflake).
positionYesNew hierarchy position (1 = lowest, just above @everyone, which sits at 0). Higher numbers rank higher.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed6 schema fields changedv2.0.0
    • addedInput schema / properties / guild_id / pattern
      Added value: +"^\\d{17,20}$"
    • changedInput schema / properties / position / description
      Previous value: -"New hierarchy position (0 = lowest, just above @everyone). Higher numbers rank higher."New value: +"New hierarchy position (1 = lowest, just above @everyone, which sits at 0). Higher numbers rank higher."
    • addedInput schema / properties / position / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / position / minimum
      Added value: +1
    • changedInput schema / properties / position / type
      Previous value: -"number"New value: +"integer"
    • addedInput schema / properties / role_id / pattern
      Added value: +"^\\d{17,20}$"
  3. Changed3 schema fields changedv1.6.0
    • addedInput schema / properties / guild_id / description
      Added value: +"Discord server (guild) ID (snowflake)."
    • addedInput schema / properties / position / description
      Added value: +"New hierarchy position (0 = lowest, just above @everyone). Higher numbers rank higher."
    • addedInput schema / properties / role_id / description
      Added value: +"ID (snowflake) of the role to reposition."
  4. Addedv1.5.0

TDQS

A4.4/5.0
Behavior4/5

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

The annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true, openWorldHint=true), and the description adds genuinely new behavioral context: the Manage Roles permission requirement and the bot-hierarchy ceiling that will cause the call to fail. It stops short of describing the response or what happens on role position collisions, so it is not fully exhaustive.

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

Conciseness5/5

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

Three tight sentences: purpose and effect first, then the operational constraint, then the sibling redirect. Every sentence carries distinct information and nothing is padded.

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?

For a 3-parameter mutation tool with full schema coverage and annotations, the description supplies the permissions and hierarchy constraints an agent needs to call it correctly and avoid a predictable failure. Only minor gaps remain, such as response shape or behavior when many roles shift.

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 100%, and the schema already documents each parameter including position's ordering semantics ('Higher numbers rank higher'), which the description largely restates. The description adds no format, range, or edge-case guidance beyond the schema, so the baseline 3 is appropriate.

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?

The description gives a specific verb+resource ('Move a role up or down in the server's role hierarchy') and explains the two consequences of the change: permission precedence and member-list ordering. It also explicitly distinguishes itself from discord_edit_role, so an agent can separate the two without opening either schema.

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

Usage Guidelines5/5

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

It states the required permission (Manage Roles), a hard constraint (target position must be below the bot's highest role), and an explicit alternative for a different intent ('To change the role's name, color or permissions, use discord_edit_role'). Both when-to-use and when-not-to-use are covered.

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