get_user
Retrieve user details by ID to access and manage user information within the Devici threat modeling platform.
Instructions
Get a specific user by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- src/devici_mcp_server/server.py:27-32 (handler)The main handler function for the 'get_user' MCP tool. It is registered via the @mcp.tool() decorator and executes the tool logic by calling the API client to fetch the user data and returning it as a string.@mcp.tool() async def get_user(user_id: str) -> str: """Get a specific user by ID""" async with create_client_from_env() as client: result = await client.get_user(user_id) return str(result)
- Supporting helper method in the DeviciAPIClient class that performs the HTTP GET request to retrieve a specific user by ID from the Devici API.async def get_user(self, user_id: str) -> Dict[str, Any]: """Get specific user by ID.""" return await self._make_request("GET", f"/users/{user_id}")