Skip to main content
Glama

discord_pin_message

Pin or unpin messages in Discord channels to highlight important information or organize content.

Instructions

Pin or unpin a message in a channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYes
pinYestrue to pin, false to unpin.

Implementation Reference

  • Handler logic for discord_pin_message tool, fetching the channel and message, then pinning or unpinning based on input.
    case "discord_pin_message": {
      const channel = await getTextChannel(args.channel_id as string);
      const msg = await channel.messages.fetch(args.message_id as string);
      if (args.pin) { await msg.pin(); } else { await msg.unpin(); }
      return { content: [{ type: "text", text: `✅ Message ${args.pin ? "pinned" : "unpinned"}.` }] };
    }
  • Schema definition for discord_pin_message tool.
    {
      name: "discord_pin_message",
      description: "Pin or unpin a message in a channel.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          message_id: { type: "string" },
          pin: { type: "boolean", description: "true to pin, false to unpin." },
        },
        required: ["channel_id", "message_id", "pin"],
      },

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