get_users
Retrieve organization user lists from the Goodday project management platform to access team member information for context-aware applications.
Instructions
Get list of organization users.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- goodday_mcp/main.py:617-632 (handler)The handler function for the 'get_users' MCP tool. It fetches the list of users from the Goodday API endpoint '/users', handles errors and unexpected formats, formats each user using the format_user helper, and joins them with separators for readable output.async def get_users() -> str: """Get list of organization users.""" data = await make_goodday_request("users") if not data: return "No users found." if isinstance(data, dict) and "error" in data: return f"Unable to fetch users: {data.get('error', 'Unknown error')}" if not isinstance(data, list): return f"Unexpected response format: {str(data)}" users = [format_user(user) for user in data] return "\n---\n".join(users)
- goodday_mcp/main.py:135-149 (helper)Helper function used by get_users to format individual user data into a multi-line string displaying key fields like ID, name, email, role, and status with defensive checks.def format_user(user: dict) -> str: """Format a user into a readable string with safe checks.""" if not isinstance(user, dict): return f"Invalid user data: {repr(user)}" # Defensive defaults in case nested keys are not dicts role = user.get('role') if isinstance(user.get('role'), dict) else {} return f""" User ID: {user.get('id', 'N/A')} Name: {user.get('name', 'N/A')} Email: {user.get('email', 'N/A')} Role: {role.get('name', 'N/A')} Status: {user.get('status', 'N/A')} """.strip()