Skip to main content
Glama
jar285

MCP-Discord

by jar285

discord_get_forum_channels

Retrieve all forum channels from a Discord server to manage discussions and organize community conversations efficiently.

Instructions

Lists all forum channels in a specified Discord server (guild)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYes

Implementation Reference

  • Main execution logic for the discord_get_forum_channels tool. Parses input, checks client readiness, fetches guild and channels, filters for forum channels (ChannelType.GuildForum), formats and returns channel info (id, name, topic).
    case "discord_get_forum_channels": {
      const { guildId } = GetForumChannelsSchema.parse(args);
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in. Please use discord_login tool first." }],
            isError: true
          };
        }
    
        const guild = await client.guilds.fetch(guildId);
        if (!guild) {
          return {
            content: [{ type: "text", text: `Cannot find guild with ID: ${guildId}` }],
            isError: true
          };
        }
    
        // Fetch all channels from the guild
        const channels = await guild.channels.fetch();
        
        // Filter to get only forum channels
        const forumChannels = channels.filter(channel => channel?.type === ChannelType.GuildForum);
        
        if (forumChannels.size === 0) {
          return {
            content: [{ type: "text", text: `No forum channels found in guild: ${guild.name}` }]
          };
        }
    
        // Format forum channels information
        const forumInfo = forumChannels.map(channel => ({
          id: channel.id,
          name: channel.name,
          topic: channel.topic || "No topic set"
        }));
    
        return {
          content: [{ type: "text", text: JSON.stringify(forumInfo, null, 2) }]
        };
      } catch (error) {
        return {
          content: [{ type: "text", text: `Failed to fetch forum channels: ${error}` }],
          isError: true
        };
      }
    }
  • Zod input schema definition requiring guildId string, used for validation in handler and reflected in tool registration.
    const GetForumChannelsSchema = z.object({
        guildId: z.string()
    });
  • src/index.ts:227-237 (registration)
    Tool registration entry in ListToolsRequestSchema handler, defining name, description, and inputSchema matching the Zod schema.
    {
      name: "discord_get_forum_channels",
      description: "Lists all forum channels in a specified Discord server (guild)",
      inputSchema: {
        type: "object",
        properties: {
          guildId: { type: "string" }
        },
        required: ["guildId"]
      }
    },
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 of behavioral disclosure. It states the tool lists forum channels but doesn't mention critical behaviors like whether it requires specific permissions, how results are formatted (e.g., pagination, error handling), or rate limits. This leaves significant gaps in understanding how the tool operates beyond its basic function.

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, well-structured sentence that efficiently conveys the core functionality without unnecessary words. It is front-loaded with the main action and resource, making it easy to parse quickly, and every part of the sentence contributes directly to understanding the tool's purpose.

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 tool's moderate complexity (listing resources in a Discord server), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects like permissions, result format, or error conditions, which are essential for an AI agent to use the tool effectively in real-world scenarios.

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?

The input schema has 1 parameter (guildId) with 0% description coverage, meaning the schema provides no semantic details. The description adds context by specifying that guildId refers to a 'specified Discord server (guild)', which clarifies its purpose. However, it doesn't explain format (e.g., numeric ID, string), validation, or examples, so it only partially compensates for the low schema coverage.

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 ('Lists all forum channels') and the target resource ('in a specified Discord server (guild)'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like discord_list_guilds or discord_get_server_info, which also involve listing Discord entities, though those focus on different resources.

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?

The description provides no guidance on when to use this tool versus alternatives, such as how it differs from other channel-related tools like discord_create_text_channel or discord_get_forum_post. It lacks context about prerequisites, exclusions, or specific scenarios where this tool is preferred, leaving usage decisions ambiguous.

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/jar285/mcp-discord'

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