Skip to main content
Glama

discord_find_channel_by_name

Locate Discord channels by name within a guild using partial matching. Input guild ID and channel name to retrieve channel details.

Instructions

Find a channel by name in a guild (partial match supported).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
nameYes

Implementation Reference

  • The handler logic for 'discord_find_channel_by_name' which fetches channels in a guild and filters them by name.
    case "discord_find_channel_by_name": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      await guild.channels.fetch();
      const keyword = (args.name as string).toLowerCase();
      const matches = guild.channels.cache
        .filter((c) => c.name.toLowerCase().includes(keyword))
        .map((c) => ({ id: c.id, name: c.name, type: ChannelType[c.type] }));
      return { content: [{ type: "text", text: JSON.stringify(matches, null, 2) }] };
    }
  • The input schema and tool definition for 'discord_find_channel_by_name'.
      name: "discord_find_channel_by_name",
      description: "Find a channel by name in a guild (partial match supported).",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          name: { type: "string" },
        },
        required: ["guild_id", "name"],
      },
    },

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