Skip to main content
Glama

discord_list_channels

Retrieve all Discord channels organized by category for a specific guild using the discord-mcp server.

Instructions

List all channels in a guild grouped by category.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes

Implementation Reference

  • The handler implementation for the 'discord_list_channels' tool, which fetches channels in a guild and organizes them by their parent category.
    case "discord_list_channels": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      await guild.channels.fetch();
      const categories = guild.channels.cache
        .filter((c) => c.type === ChannelType.GuildCategory)
        .sort((a, b) => (a as CategoryChannel).position - (b as CategoryChannel).position);
    
      const result: Record<string, unknown[]> = { "No Category": [] };
      categories.forEach((cat) => { result[cat.name] = []; });
    
      guild.channels.cache
        .filter((c) => c.type !== ChannelType.GuildCategory)
        .sort((a, b) => (a as GuildChannel).position - (b as GuildChannel).position)
        .forEach((ch) => {
          const entry = { id: ch.id, name: ch.name, type: ChannelType[ch.type] };
          const parentName = (ch as GuildChannel).parent?.name ?? "No Category";
          if (!result[parentName]) result[parentName] = [];
          result[parentName].push(entry);
        });
    
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Tool definition and input schema for 'discord_list_channels'.
      name: "discord_list_channels",
      description: "List all channels in a guild grouped by category.",
      inputSchema: {
        type: "object",
        properties: { guild_id: { type: "string" } },
        required: ["guild_id"],
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the grouping behavior ('grouped by category'), which is useful, but lacks critical details such as whether this is a read-only operation, if it requires specific permissions, pagination handling, or rate limits. The description is minimal and misses key behavioral traits for a Discord API tool.

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 a single, efficient sentence that front-loads the core purpose without any wasted words. It is appropriately sized for a simple list operation, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It omits details about return values (e.g., structure of grouped channels), error conditions, permissions needed, or rate limiting. For a tool with no structured support, the description should provide more context to guide effective use.

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

Parameters2/5

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

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic information. The description does not explain the 'guild_id' parameter at all—it doesn't clarify what a guild is, how to obtain the ID, or format requirements. This leaves the parameter meaning unclear beyond the schema's type.

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 clearly states the action ('List all channels') and resource ('in a guild'), specifying the grouping ('grouped by category'). It distinguishes from siblings like 'discord_find_channel_by_name' by indicating it lists all channels rather than searching, but doesn't explicitly differentiate from other list tools like 'discord_list_roles' beyond the resource type.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't mention when to choose this over 'discord_find_channel_by_name' for finding specific channels or 'discord_get_forum_channels' for forum-specific listings, nor does it specify prerequisites like needing guild access.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaSympa/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server