Skip to main content
Glama

discord_add_role

Assign a role to a Discord member by providing guild, user, and role IDs. This tool manages user permissions and access within Discord servers.

Instructions

Assign a role to a member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guild_idYes
user_idYes
role_idYes
reasonNo

Implementation Reference

  • The handler logic for 'discord_add_role', which fetches the guild and member, then adds the specified role.
    case "discord_add_role": {
      const guild = await discord.guilds.fetch(validateId(args.guild_id, "guild_id"));
      const member = await guild.members.fetch(args.user_id as string);
      await member.roles.add(args.role_id as string, args.reason as string | undefined);
      return { content: [{ type: "text", text: `✅ Role added to ${member.user.tag}.` }] };
    }
  • The tool definition and input schema for 'discord_add_role'.
    {
      name: "discord_add_role",
      description: "Assign a role to a member.",
      inputSchema: {
        type: "object",
        properties: {
          guild_id: { type: "string" },
          user_id: { type: "string" },
          role_id: { type: "string" },
          reason: { type: "string" },
        },
        required: ["guild_id", "user_id", "role_id"],
      },
    },
Behavior1/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 but offers minimal information. It does not mention required permissions, potential side effects (e.g., role hierarchy constraints), rate limits, or what happens on success/failure. This is inadequate for a mutation tool with zero annotation coverage.

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 with no wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

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?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks essential context such as permission requirements, error conditions, and parameter explanations, leaving significant gaps for an AI agent to use it correctly.

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

Parameters1/5

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

Schema description coverage is 0%, meaning none of the 4 parameters are documented in the schema. The description adds no parameter semantics beyond the tool name, failing to explain what 'guild_id', 'user_id', 'role_id', or 'reason' represent or how to obtain them.

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 ('Assign') and target ('a role to a member'), providing a specific verb+resource combination. However, it does not distinguish itself from sibling tools like 'discord_remove_role' or explain how it differs from similar permissions-related tools in the list.

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 does not mention prerequisites (e.g., needing appropriate permissions), when not to use it, or how it relates to sibling tools like 'discord_remove_role' or 'discord_set_role_permission'.

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