invite_user
Add a new user to Devici by providing their email, first name, last name, and role. This tool facilitates user management for threat modeling resources.
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', registered via @mcp.tool() decorator. It creates an API client and calls invite_user on it, returning the stringified result.@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 API client method that constructs the user data and makes the POST request to /users/invite endpoint in the Devici API.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)