Skip to main content
Glama

canvas_create_user

Add a new user to a Canvas account by specifying account ID, user details, and login credentials, including name, unique ID, and optional time zone or SIS ID.

Instructions

Create a new user in an account

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
account_idYesID of the account
pseudonymYes
userYes

Implementation Reference

  • Core handler function in CanvasClient that performs the POST request to Canvas API endpoint `/accounts/{account_id}/users` to create a new user account.
    async createUser(args: CreateUserArgs): Promise<CanvasUser> {
      const { account_id, ...userData } = args;
      const response = await this.client.post(`/accounts/${account_id}/users`, userData);
      return response.data;
    }
  • src/index.ts:755-785 (registration)
    Tool registration in the TOOLS array, defining name, description, and input schema for the canvas_create_user tool.
    {
      name: "canvas_create_user",
      description: "Create a new user in an account",
      inputSchema: {
        type: "object",
        properties: {
          account_id: { type: "number", description: "ID of the account" },
          user: {
            type: "object",
            properties: {
              name: { type: "string", description: "Full name of the user" },
              short_name: { type: "string", description: "Short name of the user" },
              sortable_name: { type: "string", description: "Sortable name (Last, First)" },
              time_zone: { type: "string", description: "User's time zone" }
            },
            required: ["name"]
          },
          pseudonym: {
            type: "object",
            properties: {
              unique_id: { type: "string", description: "Unique login ID (email or username)" },
              password: { type: "string", description: "User's password" },
              sis_user_id: { type: "string", description: "SIS ID for the user" },
              send_confirmation: { type: "boolean", description: "Send confirmation email" }
            },
            required: ["unique_id"]
          }
        },
        required: ["account_id", "user", "pseudonym"]
      }
    },
  • MCP server handler case that validates arguments, invokes CanvasClient.createUser, and formats the response for the tool call.
    case "canvas_create_user": {
      const createUserArgs = args as unknown as CreateUserArgs;
      if (!createUserArgs.account_id || !createUserArgs.user || !createUserArgs.pseudonym) {
        throw new Error("Missing required fields: account_id, user, and pseudonym");
      }
      
      const user = await this.client.createUser(createUserArgs);
      return {
        content: [{ type: "text", text: JSON.stringify(user, null, 2) }]
      };
    }
  • TypeScript interface defining the input arguments for creating a Canvas user, used for type safety and validation.
    export interface CreateUserArgs {
      account_id: number;
      user: {
        name: string;
        short_name?: string;
        sortable_name?: string;
        time_zone?: string;
        locale?: string;
        birthdate?: string;
        terms_of_use?: boolean;
        skip_registration?: boolean;
      };
      pseudonym: {
        unique_id: string;
        password?: string;
        sis_user_id?: string;
        integration_id?: string;
        send_confirmation?: boolean;
        force_validations?: boolean;
        authentication_provider_id?: string;
      };
      communication_channel?: {
        type: 'email' | 'sms';
        address: string;
        skip_confirmation?: boolean;
      };
      force_validations?: boolean;
      enable_sis_reactivation?: boolean;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create' implies a write/mutation operation, but the description doesn't state whether this requires specific permissions, what happens on success/failure (e.g., returns user ID, sends email), whether it's idempotent, or any rate limits. For a user creation tool with zero annotation coverage, this leaves critical behavioral aspects unspecified.

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 that gets straight to the point with zero wasted words. It's appropriately sized for a basic tool description and front-loads the essential information (create + user + account context). Every word earns its place.

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 user creation tool with 3 complex nested parameters, 33% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what happens after creation (e.g., does it return the new user's ID?), what permissions are needed, how errors are handled, or the purpose of the pseudonym object versus user object. The description should provide more context given the tool's complexity and lack of supporting documentation.

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

Parameters2/5

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

Schema description coverage is only 33%, meaning most parameters lack documentation in the schema. The description adds no parameter information beyond what's implied by 'new user in an account' - it doesn't explain the three required objects (account_id, user, pseudonym), their relationships, or what fields like 'sis_user_id' or 'time_zone' mean in context. The description fails to compensate for the low schema coverage.

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 ('Create') and resource ('new user in an account'), making the purpose immediately understandable. It distinguishes from siblings like 'canvas_enroll_user' (which likely adds existing users to courses) and 'canvas_update_user_profile' (which modifies existing users). However, it doesn't specify what constitutes a 'user' in this context (e.g., student, teacher, admin).

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 doesn't mention prerequisites (e.g., needing admin permissions), differentiate from 'canvas_enroll_user' (which might handle course enrollment rather than user creation), or specify when this is appropriate versus other user management methods. The agent must infer usage from the tool name alone.

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

Related 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/DMontgomery40/mcp-canvas-lms'

If you have feedback or need assistance with the MCP directory API, please join our Discord server