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
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_id": "<user_id>"
},
"name": "get_user_by_id"
}
}Input 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)