Skip to main content
Glama

discord_set_member_permission

Idempotent

Set per-channel permission overwrites for a specific member by allowing or denying Discord permission flags, updating their existing permissions in place.

Instructions

Add or update a per-channel permission overwrite for a single member, allowing and/or denying specific permissions. Merges with the member's existing overwrite. Requires the Manage Roles permission. Use discord_set_role_permission to target a whole role instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
denyNoPermission flag names to deny (array, or JSON-encoded array string).
allowNoPermission flag names to allow, e.g. ['ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names.
reasonNoOptional reason recorded in the server audit log.
user_idYesID (snowflake) of the member to grant/deny permissions for.
channel_idYesID (snowflake) of the channel to set the overwrite on.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed10 schema fields changedv2.0.0
    • addedInput schema / properties / allow / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / allow / description
      Previous value: -"Permission flag names to allow, e.g. ['ViewChannel']. Uses Discord PermissionsBitField flag names."New value: +"Permission flag names to allow, e.g. ['ViewChannel'] (or the same array JSON-encoded as a string). Uses Discord PermissionsBitField flag names."
    • removedInput schema / properties / allow / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / allow / type
      Removed value: -"array"
    • addedInput schema / properties / channel_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / deny / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / properties / deny / description
      Previous value: -"Permission flag names to deny."New value: +"Permission flag names to deny (array, or JSON-encoded array string)."
    • removedInput schema / properties / deny / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / deny / type
      Removed value: -"array"
    • addedInput schema / properties / user_id / pattern
      Added value: +"^\\d{17,20}$"
  3. Changed5 schema fields changedv1.6.0
    • addedInput schema / properties / allow / description
      Added value: +"Permission flag names to allow, e.g. ['ViewChannel']. Uses Discord PermissionsBitField flag names."
    • addedInput schema / properties / channel_id / description
      Added value: +"ID (snowflake) of the channel to set the overwrite on."
    • addedInput schema / properties / deny / description
      Added value: +"Permission flag names to deny."
    • addedInput schema / properties / reason / description
      Added value: +"Optional reason recorded in the server audit log."
    • addedInput schema / properties / user_id / description
      Added value: +"ID (snowflake) of the member to grant/deny permissions for."
  4. Addedv1.5.0
  5. Removedv1.0.0
  6. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true), the description adds meaningful behavioral context: it merges with the member's existing overwrite rather than replacing it, and it requires the Manage Roles permission. This gives the agent a solid understanding of the write 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?

Three concise sentences with no filler: the core action, key behavioral detail, permission requirement, and sibling alternative are all included. The most important scoping information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a permission-overwrite tool with rich schema coverage and no output schema, the description covers the essential invocation context: what it does, the merge semantics, the permission prerequisite, and when to use the sibling tool. Nothing critical is missing.

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%, so the schema already documents channel_id, user_id, allow, deny, and reason thoroughly. The description reinforces that allow/deny accept specific permission flags and that the operation merges, but it does not need to add much parameter detail beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific verb ('Add or update'), a precise resource ('per-channel permission overwrite for a single member'), and the effect ('allowing and/or denying specific permissions'). It also distinguishes itself from the role-targeted sibling tool, making it easy to select correctly.

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

Usage Guidelines5/5

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

It explicitly names the required 'Manage Roles' permission, which is essential preconditions information. It also gives a clear routing instruction: use discord_set_role_permission when targeting a whole role instead. This is direct, actionable guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools