discord_list_guilds
Retrieve a list of all Discord servers where the bot is currently connected, enabling server management and monitoring.
Instructions
List all Discord servers the bot is connected to.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/discovery.ts:7-11 (schema)Definition of the discord_list_guilds tool, including its name, description, and empty input schema.
{ name: "discord_list_guilds", description: "List all Discord servers the bot is connected to.", inputSchema: { type: "object", properties: {} }, }, - src/tools/discovery.ts:50-55 (handler)Implementation of the discord_list_guilds tool, which fetches guilds from the Discord client cache and returns them as a JSON string.
case "discord_list_guilds": { const guilds = discord.guilds.cache.map((g) => ({ id: g.id, name: g.name, memberCount: g.memberCount, icon: g.iconURL(), })); return { content: [{ type: "text", text: JSON.stringify(guilds, null, 2) }] }; }