Skip to main content
Glama

discord_set_role_permission

Configure Discord channel permissions for roles by allowing or denying specific actions like sending messages or viewing channels.

Instructions

Allow or deny specific permissions for a role on a channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
role_idYes
allowNoe.g. ['SendMessages','ViewChannel']
denyNo
reasonNo

Implementation Reference

  • The handler logic for "discord_set_role_permission", which updates role permission overwrites on a channel using discord.js.
    case "discord_set_role_permission": {
      const channel = await getGuildChannel(args.channel_id as string);
      const options: PermissionOverwriteOptions = {};
      parsePermArray(args.allow).forEach((p) => { (options as Record<string, boolean>)[p] = true; });
      parsePermArray(args.deny).forEach((p) => { (options as Record<string, boolean>)[p] = false; });
      await channel.permissionOverwrites.edit(args.role_id as string, options, { reason: args.reason as string | undefined });
      return { content: [{ type: "text", text: `✅ Permissions updated for role ${args.role_id} on #${channel.name}.` }] };
    }
  • The schema definition for "discord_set_role_permission", specifying the required inputs (channel_id, role_id) and optional inputs (allow, deny, reason).
    {
      name: "discord_set_role_permission",
      description: "Allow or deny specific permissions for a role on a channel.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          role_id: { type: "string" },
          allow: { type: "array", items: { type: "string" }, description: "e.g. ['SendMessages','ViewChannel']" },
          deny: { type: "array", items: { type: "string" } },
          reason: { type: "string" },
        },
        required: ["channel_id", "role_id"],
      },
    },
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 the action ('Allow or deny') but doesn't describe critical traits: whether this is a mutation (implied but not explicit), what permissions are available (e.g., Discord permission names), if changes are reversible, required bot permissions, rate limits, or error handling. This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and target, making it easy to parse. There's no wasted text, and it fits well within a concise format.

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 complexity (a mutation tool with 5 parameters, no annotations, and no output schema), the description is incomplete. It lacks details on behavioral traits, parameter usage, error cases, and output expectations. For a tool that modifies permissions in a platform like Discord, more context is needed to ensure safe and correct usage by an agent.

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 low at 20%, with only the 'allow' parameter having a description. The tool description adds minimal value beyond the schema: it implies 'allow' and 'deny' parameters but doesn't explain their semantics, valid values, or interactions. It doesn't cover 'channel_id', 'role_id', or 'reason'. Baseline is 3 due to low coverage, but the description doesn't adequately compensate for the gaps.

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 ('Allow or deny') and target ('specific permissions for a role on a channel'), making the purpose understandable. It distinguishes itself from siblings like discord_add_role or discord_edit_role by focusing on channel-specific permissions rather than role creation or general role editing. However, it doesn't specify the exact resource (e.g., Discord channel permissions) or differentiate from discord_set_member_permission, which is a similar sibling tool.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose this over discord_set_member_permission (for member-level permissions) or discord_reset_channel_permissions (for clearing permissions), nor does it specify prerequisites like required permissions or channel types. Usage is implied from the action but lacks explicit context.

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