Skip to main content
Glama

Remover participante(s) de um grupo da disciplina

remove_group_member
Idempotent

Removes one or more users from a Moodle course group after validating group-management permissions and course enrollment, then confirms the removal.

Instructions

Remove um ou mais participantes de um grupo da disciplina validando moodle/course:managegroups e matrícula no curso. Operação idempotente e auditada que confirma a remoção no Moodle antes de retornar.

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": {
      "groupId": "<groupId>"
    },
    "name": "remove_group_member"
  }
}

Input Schema

NameRequiredDescriptionDefault
userIdNoID de um usuário/aluno (userid) a remover do grupo.
groupIdYesID do grupo (groupId) no Moodle.
userIdsNoLista opcional de IDs de usuários a remover do grupo.
courseIdNoID opcional da disciplina (validado contra o grupo).
activityCmidNoCourse module ID opcional (ex: mod_groupselect) para conferência de estado.
idempotencyKeyNoChave opcional de idempotência.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false, so repeating 'Operação idempotente' is redundant. The description does add genuinely new context: validation of a specific Moodle capability, enrollment verification, and an audit trail plus remote confirmation before returning. It stops short of describing what happens on partial failure in a multi-user removal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences with the core action and the key behavioral guarantees front-loaded. Little waste, though the idempotency claim duplicates the annotation.

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

Completeness3/5

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

For a mutation tool with six parameters and no output schema, the description covers permissions and side effects but leaves gaps an agent would care about: what the return value reports, and how partial failures or missing users are handled during a bulk removal.

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 baseline is 3 regardless. The description says 'um ou mais' participants but never explains the relationship or precedence between the singular userId and the plural userIds, and says nothing about idempotencyKey, courseId, or activityCmid beyond what the schema already documents.

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 states a specific verb and resource ('Remove um ou mais participantes de um grupo da disciplina') and makes the batch nature explicit. It is clearly the inverse of the sibling add_group_member, though it never names that sibling to reinforce the distinction.

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

Usage Guidelines3/5

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

Prerequisites are stated (requires moodle/course:managegroups and enrollment in the course), which gives implicit guidance on when the call will succeed. However, there is no explicit when-to-use versus when-not guidance, no mention of preferring this over some other membership path, and no steering toward get_group_members for pre-checking.

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