invite_user
Add new users to Devici by sending email invitations with specified roles and personal details for team collaboration.
Instructions
Invite a new user to Devici
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | |||
| first_name | Yes | ||
| last_name | Yes | ||
| role | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:43-48 (handler)The MCP tool handler for 'invite_user', decorated with @mcp.tool() which registers it on the FastMCP server instance. This function executes the tool logic by calling the API client's invite_user method.@mcp.tool() async def invite_user(email: str, first_name: str, last_name: str, role: str) -> str: """Invite a new user to Devici""" async with create_client_from_env() as client: result = await client.invite_user(email, first_name, last_name, role) return str(result)
- Supporting utility in the DeviciAPIClient class that constructs the user data and makes the authenticated POST request to the Devici API endpoint /users/invite to perform the user invitation.async def invite_user(self, email: str, first_name: str, last_name: str, role: str) -> Dict[str, Any]: """Invite specific user.""" user_data = { "email": email, "firstName": first_name, "lastName": last_name, "role": role } return await self._make_request("POST", "/users/invite", json_data=user_data)