get_user
Retrieve detailed user information by ID using the input schema to interact with Devici API, facilitating precise user management in threat modeling resources.
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 primary MCP tool handler for 'get_user', including the @mcp.tool() decorator for registration. It invokes the API client to fetch and return user data 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 API client method that executes the HTTP GET request to the Devici API endpoint /users/{user_id} to retrieve the user data.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}")