Skip to main content
Glama

Give or remove a role

set_member_roles
Idempotent

Use this when the user wants to give a role to members or take it from them (roles with moderation or admin permissions are refused). Do not use for editing the role itself; use edit_role. Adds the change to the pending card for this server; nothing changes on Discord until apply_card.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "guild_id": "<guild_id>",
      "role": "<role>",
      "members": "<members>"
    },
    "name": "set_member_roles"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleYesThe role name.
actionNoadd by default.
membersYesMembers: display name, username or mention.
guild_idYesDiscord server ID, as returned by list_my_servers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing two non-obvious behaviors: privileged roles (moderation/admin) are refused, and the change is only staged on a pending card until apply_card. That staging semantics is the single most important thing to know here and annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) do not convey it.

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 compact sentences in a deliberate order: use case, exclusion/alternative, then deferred-effect behavior. No filler and no repetition of schema content.

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

Completeness4/5

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

For a 4-parameter mutation with annotations but no output schema, the definition covers the critical workflow (staged change, apply_card) and the privilege restriction. It stops slightly short of describing what the tool returns (e.g., the pending card entry or a confirmation), which matters since no output schema exists.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so formats and the add/remove enum are already documented and the baseline is 3. The description adds a real selection constraint not in the schema: roles carrying moderation or admin permissions cannot be targeted, which changes how an agent should choose the `role` argument.

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?

Opens with a specific verb pair and resource: 'give a role to members or take it from them'. It also names the adjacent-but-different tool (edit_role) so an agent can separate role assignment from role editing without opening either schema.

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?

States both the when ('user wants to give a role... or take it') and the when-not ('Do not use for editing the role itself; use edit_role'). The alternative is named explicitly with the condition that selects it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources