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
| Name | Required | Description | Default |
|---|---|---|---|
| guild_id | Yes | ||
| name | Yes |
Implementation Reference
- src/tools/discovery.ts:94-102 (handler)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) }] }; } - src/tools/discovery.ts:31-41 (schema)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"], }, },