Skip to main content
Glama

Add a user to a group

assign_user_to_group
Idempotent

Assign a user to one Wiki.js group while preserving existing memberships. Use the confirmation token to finalize the access-granting change.

Instructions

Adds one account to one group, leaving its other memberships alone — the additive counterpart to update_user’s groups list. Requires a confirmation token, because a group is what grants access.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYesNumeric Wiki.js id.
group_idYesNumeric Wiki.js id.
confirm_tokenNoToken from this tool’s previous, unconfirmed call. Omit it to receive one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
truncatedNoPresent only when the answer was shortened to fit the budget.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • changedInput schema / properties / group_id / maximum
      Previous value: -9007199254740991New value: +2147483647
    • changedInput schema / properties / user_id / maximum
      Previous value: -9007199254740991New value: +2147483647
  2. Changed2 schema fields changedv0.2.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": true,
      +  "properties": {
      +    "truncated": {
      +      "additionalProperties": true,
      +      "description": "Present only when the answer was shortened to fit the budget.",
      +      "properties": {},
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observedv0.1.2

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description adds meaningful behavioral context: the operation is additive and non-destructive to other memberships, and it requires a confirmation token because 'a group is what grants access.' This extra detail about the two-step token flow and security rationale is valuable and does not contradict any annotation.

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?

Two sentences with no filler: the first fronts the core action and differentiates it from update_user; the second explains the confirmation-token requirement. Every word earns its place.

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?

The description, combined with the fully documented schema and output schema, covers everything an agent needs: the action, the alternative, the token flow, and the safety profile. Sibling tools like unassign_user_from_group further clarify its scope, and the description is complete for a single-assignment mutation tool.

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 the schema already documents all three parameters. The description adds semantic context for confirm_token by explaining why it is required and how it fits into the additive operation, but it doesn't need to repeat the schema definitions for user_id and group_id.

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?

Description states a specific verb and resource: 'Adds one account to one group, leaving its other memberships alone.' It clearly distinguishes itself from update_user's groups list and from removal operations, so an agent can tell what the tool does at a glance.

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 frames the tool as 'the additive counterpart to update_user’s groups list,' telling the agent when to use this tool versus the alternative. The confirmation-token requirement is also called out as a prerequisite, giving clear operational context.

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