Skip to main content
Glama

discord_list_webhooks

List all webhooks for a specific Discord channel or entire guild to manage automated message delivery and integrations.

Instructions

List all webhooks for a channel or guild. Provide either channel_id or guild_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idNoList webhooks for a specific channel.
guild_idNoList all webhooks in a guild.

Implementation Reference

  • The implementation logic for "discord_list_webhooks" inside the 'handle' function, which fetches webhooks from either a channel or a guild.
    case "discord_list_webhooks": {
      if (args.channel_id) {
        const channel = await discord.channels.fetch(validateId(args.channel_id, "channel_id"));
        if (!channel || !("fetchWebhooks" in channel)) throw new Error("Channel does not support webhooks.");
        const webhooks = await (channel as any).fetchWebhooks();
        const result = [...webhooks.values()].map((w: any) => ({
          id: w.id,
          name: w.name,
          channel_id: w.channelId,
          token: w.token ?? null,
          creator: w.owner?.tag ?? null,
        }));
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } else if (args.guild_id) {
        const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
        const webhooks = await guild.fetchWebhooks();
        const result = [...webhooks.values()].map((w) => ({
          id: w.id,
          name: w.name,
          channel_id: w.channelId,
          token: w.token ?? null,
          creator: w.owner && "tag" in w.owner ? w.owner.tag : (w.owner?.username ?? null),
        }));
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } else {
        throw new Error("Either channel_id or guild_id is required.");
      }
  • The tool definition/registration for "discord_list_webhooks" including the input schema.
    {
      name: "discord_list_webhooks",
      description: "List all webhooks for a channel or guild. Provide either channel_id or guild_id.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string", description: "List webhooks for a specific channel." },
          guild_id: { type: "string", description: "List all webhooks in a guild." },
        },
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't mention important behavioral aspects like whether this is a read-only operation, what permissions are required, rate limits, pagination behavior, or what the output format looks like. The description is minimal and lacks behavioral context beyond the 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 perfectly concise with two sentences that each serve a clear purpose: the first states the tool's function, the second provides parameter guidance. There's zero wasted language and the information is front-loaded appropriately.

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 insufficiently complete. While it states the basic function, it doesn't address important contextual aspects like authentication requirements, rate limiting, pagination, error conditions, or return format. For a tool that presumably interacts with Discord's API, this leaves significant gaps in understanding how to use it effectively.

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?

Schema description coverage is 100%, with both parameters clearly documented in the schema itself. The description adds minimal value beyond the schema by reinforcing the exclusive choice between channel_id and guild_id, but doesn't provide additional semantic context about parameter formats, constraints, or usage nuances.

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 webhooks') and the target resource ('for a channel or guild'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'discord_create_webhook' or 'discord_delete_webhook' beyond the obvious 'list' vs 'create/delete' distinction.

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

Usage Guidelines4/5

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

The description provides clear context about when to use this tool ('Provide either channel_id or guild_id'), establishing an exclusive choice between two parameters. It doesn't mention when NOT to use it or explicitly name alternatives among sibling tools, but the parameter guidance is sufficient for basic usage.

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