Skip to main content
Glama

discord_copy_permissions

Copy permission overwrites from one Discord channel to another to maintain consistent access controls across channels.

Instructions

Copy all permission overwrites from one channel to another.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_channel_idYes
target_channel_idYes
reasonNo

Implementation Reference

  • Implementation of the 'discord_copy_permissions' tool handler, which fetches the source and target channels and sets the target's permission overwrites to match the source.
    case "discord_copy_permissions": {
      const source = await getGuildChannel(args.source_channel_id as string);
      const target = await getGuildChannel(args.target_channel_id as string);
      const overwrites = source.permissionOverwrites.cache.map((ow) => ({
        id: ow.id, type: ow.type, allow: ow.allow, deny: ow.deny,
      }));
      await target.permissionOverwrites.set(overwrites, args.reason as string | undefined);
      return { content: [{ type: "text", text: `✅ Permissions copied from #${source.name} to #${target.name}.` }] };
    }
  • Tool definition and schema for 'discord_copy_permissions', specifying required arguments source_channel_id and target_channel_id.
      name: "discord_copy_permissions",
      description: "Copy all permission overwrites from one channel to another.",
      inputSchema: {
        type: "object",
        properties: {
          source_channel_id: { type: "string" },
          target_channel_id: { type: "string" },
          reason: { type: "string" },
        },
        required: ["source_channel_id", "target_channel_id"],
      },
    },

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