list_users
Retrieve all system users with their roles and permissions for administrative oversight and access management.
Instructions
List all users in the system (admin only).
Returns all users with their roles and permissions. Requires admin privileges.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_coroot/server.py:1615-1623 (handler)Handler implementation for the list_users MCP tool. Calls CorootClient.list_users() and formats the response with success wrapper.@handle_errors async def list_users_impl() -> dict[str, Any]: """List all users.""" users = await get_client().list_users() return { "success": True, "users": users, }
- src/mcp_coroot/server.py:1625-1633 (registration)MCP tool registration for 'list_users' using FastMCP @mcp.tool() decorator. Includes tool description docstring and delegates to implementation.@mcp.tool() async def list_users() -> dict[str, Any]: """List all users in the system (admin only). Returns all users with their roles and permissions. Requires admin privileges. """ return await list_users_impl() # type: ignore[no-any-return]
- src/mcp_coroot/client.py:1273-1281 (helper)CorootClient helper method that performs the actual API call to GET /api/users to retrieve user list.async def list_users(self) -> dict[str, Any]: """List all users (admin only). Returns: List of all users. """ response = await self._request("GET", "/api/users") data: dict[str, Any] = response.json() return data