get_user_by_id
Retrieve user details from Alteryx Servers by specifying a unique user ID to access account information and permissions.
Instructions
Get a user by their ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- src/tools.py:363-369 (handler)Core implementation of get_user_by_id tool: calls Alteryx Users API to retrieve user details by ID and formats the response with error handling.def get_user_by_id(self, user_id: str): """Get a user by their ID""" try: api_response = self.users_api.users_get_user(user_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:236-239 (registration)MCP tool registration using @app.tool() decorator with a wrapper that delegates to AYXMCPTools.get_user_by_id.@self.app.tool() def get_user_by_id(user_id: str): """Get a user by their ID""" return self.tools.get_user_by_id(user_id)