deactivate_user
Deactivate a user account on Alteryx Servers by specifying the user ID, ensuring secure and controlled access management through the AYX-MCP-Wrapper interface.
Instructions
Deactivate a user account
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes |
Implementation Reference
- src/tools.py:474-483 (handler)Core implementation of the deactivate_user tool. Validates user existence, calls the Alteryx Server Users API to deactivate the user, formats and returns the API response.def deactivate_user(self, user_id: str): """Deactivate a user by their ID""" try: user = self.users_api.users_get_user(user_id) if not user: return "Error: User not found" api_response = self.users_api.users_deactivate_user(user_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:276-279 (registration)MCP tool registration using @app.tool() decorator. This defines the tool schema from the function signature and docstring, and delegates execution to the Tools class instance method.@self.app.tool() def deactivate_user(user_id: str): """Deactivate a user account""" return self.tools.deactivate_user(user_id)
- src/mcp_server.py:71-71 (helper)Description of the deactivate_user tool in the system prompt for the MCP server, listing available tools.- deactivate_user: Deactivate a user