Skip to main content
Glama

create_user

Admin-only tool to create user accounts with specific roles and permissions. Utilizes user data including email, name, and role for account setup on the MCP Server for Coroot.

Instructions

Create a new user (admin only).

Creates a new user account with specified role and permissions. Requires admin privileges.

Args: user_data: New user information including email, name, role

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_dataYes

Implementation Reference

  • MCP tool handler function for 'create_user', registered via @mcp.tool() decorator. Delegates to the implementation wrapper.
    @mcp.tool() async def create_user(user_data: dict[str, Any]) -> dict[str, Any]: """Create a new user (admin only). Creates a new user account with specified role and permissions. Requires admin privileges. Args: user_data: New user information including email, name, role """ return await create_user_impl(user_data) # type: ignore[no-any-return]
  • Implementation wrapper that calls CorootClient.create_user and formats the response with success/error handling.
    @handle_errors async def create_user_impl(user_data: dict[str, Any]) -> dict[str, Any]: """Create a new user.""" result = await get_client().create_user(user_data) return { "success": True, "message": "User created successfully", "user": result, }
  • Core API client method that performs the HTTP POST request to Coroot's /api/users endpoint to create a new user account.
    async def create_user(self, user_data: dict[str, Any]) -> dict[str, Any]: """Create a new user (admin only). Args: user_data: New user data with fields: - email: User email - name: Display name - role: Admin|Editor|Viewer - password: Initial password Returns: Created user. """ # Add action field required by Coroot request_data = {"action": "create", **user_data} response = await self._request( "POST", "/api/users", json=request_data, ) data: dict[str, Any] = response.json() return data

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/jamesbrink/mcp-coroot'

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