Skip to main content
Glama

discord_list_roles

Read-only

List all roles in a Discord server (excluding @everyone) with color, position, member count, and permissions. Read-only overview to identify role hierarchy and assignments.

Instructions

List all roles in a server (excluding @everyone), highest-first, with color, position, member count, and permissions. Read-only. Returns { roles: [...] }. Use discord_get_role_members to see who holds a given role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYesDiscord server (guild) ID (snowflake).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rolesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / guild_id / pattern
      Added value: +"^\\d{17,20}$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "roles": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "color": {
      +            "type": "string"
      +          },
      +          "hoist": {
      +            "type": "boolean"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "memberCount": {
      +            "type": "number"
      +          },
      +          "mentionable": {
      +            "type": "boolean"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "permissions": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "position": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "name",
      +          "color",
      +          "position",
      +          "memberCount",
      +          "permissions",
      +          "hoist",
      +          "mentionable"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "roles"
      +  ],
      +  "type": "object"
      +}
  3. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / guild_id / description
      Added value: +"Discord server (guild) ID (snowflake)."
  4. Addedv1.5.0
  5. Removedv1.0.0
  6. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

The description adds meaningful behavioral detail beyond the annotations: roles are sorted highest-first, @everyone is excluded, and the output fields include color, position, member count, and permissions. It also confirms the return shape as { roles: [...] }. While 'Read-only' repeats the readOnlyHint annotation, the additional behavioral specifics justify a strong score.

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?

The description is three crisp sentences that front-load the core behavior, then add ordering/exclusion details, return shape, and a sibling pointer. Every sentence earns its place and there is no redundant prose beyond the harmless restatement of read-only.

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

Completeness5/5

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

For a simple one-parameter, read-only list operation with an output schema and readOnlyHint annotation, the description covers what is needed: scope, ordering, exclusions, returned fields, output structure, and a pointer to the relevant sibling for membership lookup. No material gap remains.

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 single parameter guild_id is already described in the schema as a Discord server ID snowflake. The description adds no parameter-specific semantics, which is acceptable because the schema fully documents the one required input. Baseline 3 applies.

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 states a specific action ('List all roles in a server') and adds rich detail: enumeration excludes @everyone, ordering is highest-first, and returned fields are named (color, position, member count, permissions). This clearly distinguishes it from role-mutation siblings like discord_create_role/discord_edit_role and from discord_get_role_members, so an agent can confidently identify its purpose.

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?

The description explicitly routes the agent to a sibling alternative, discord_get_role_members, for resolving which members hold a role. It also implies the appropriate use case of enumerating a server's roles rather than mutating or inspecting individual memberships. It does not exhaustively discuss when not to use the tool, but the clear sibling pointer provides useful selection guidance.

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