Skip to main content
Glama

get_user

Retrieve detailed information about a specific user by providing their user ID. Ideal for integration with the Goodday project management platform to access user data securely.

Instructions

Get details of a specific user.

Args: user_id: The ID of the user to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes

Implementation Reference

  • The handler function for the 'get_user' tool. It makes an API request to retrieve user details by ID and formats the response using format_user helper. Registered via @mcp.tool() decorator.
    @mcp.tool() async def get_user(user_id: str) -> str: """Get details of a specific user. Args: user_id: The ID of the user to retrieve """ data = await make_goodday_request(f"user/{user_id}") if not data: return "User not found." if isinstance(data, dict) and "error" in data: return f"Unable to fetch user: {data.get('error', 'Unknown error')}" return format_user(data)
  • Helper function used by get_user to format the retrieved user data into a human-readable string.
    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()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cdmx-in/goodday-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server