Skip to main content
Glama

Enroll User

enroll_user
Destructive

Enroll a user in a course with a specified role.

Instructions

Enroll a user in a course with a specified role.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesThe enrollment type
user_idYesThe Canvas user ID to enroll
course_idYesThe Canvas course ID
enrollment_stateNoInitial enrollment state (defaults to invited)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.18.15
    • addedInput schema / properties / course_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / course_id / type
      Removed value: -"number"
    • addedInput schema / properties / user_id / anyOf
      Added value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "maximum": 9007199254740991,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^[1-9][0-9]{0,18}$",
      +    "type": "string"
      +  }
      +]
    • removedInput schema / properties / user_id / type
      Removed value: -"number"
  2. Changed1 schema field changedv1.18.11
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  3. First observedv1.18.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations declare destructiveHint=true and openWorldHint=true, but the description adds nothing beyond them: it does not say whether enrolling an already-enrolled user errors or duplicates, whether the call is idempotent, what permissions are required, or that it is a write that changes course membership. For a mutation with no output schema, this is thin.

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?

A single front-loaded sentence with no filler and no redundancy. It is efficient, though the brevity contributes to the missing behavioral and usage context rather than being purely a virtue.

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?

With four parameters, two enums, no output schema, and only destructive/openWorld annotations, the description should carry more: effect of the enrollment_state default, duplicate-enrollment behavior, and required permissions are all absent. It is not sufficient on its own for correct invocation.

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 course_id, user_id, type, and enrollment_state in detail. 'With a specified role' loosely gestures at the type enum but adds no meaning beyond the schema's enum list and default note, so the baseline 3 applies.

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 names a specific verb and resource ('Enroll a user in a course') and signals that a role must be supplied, so an agent can identify the operation. It does not, however, distinguish this from the nearby sibling 'remove_enrollment' or note how it relates to 'list_enrollments'.

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?

There is no when-to-use guidance, no prerequisites (permissions, course context), and no reference to alternative or complementary tools such as remove_enrollment for reversing the action. The agent must infer all of this.

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