Skip to main content
Glama

update_user_details

Modify user information in the AYX-MCP-Wrapper server by updating first name, last name, and email using the user's unique ID for identification.

Instructions

Update details of an existing user by their ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYes
first_nameYes
last_nameYes
user_idYes

Implementation Reference

  • Implements the core logic for updating user details by retrieving current user data, constructing an UpdateUserContract with new values (preserving unchanged fields), and invoking the Alteryx Server API's users_update_user method.
    def update_user_details(self, user_id: str, first_name: str, last_name: str, email: str): """Update details of an existing user by their ID. Can be used to update any of the user's details.""" try: user_details = self.users_api.users_get_user(user_id) if not user_details: return "Error: User not found" contract = server_client.UpdateUserContract( id=user_details.id, first_name=first_name if first_name else user_details.first_name, last_name=last_name if last_name else user_details.last_name, email=email if email else user_details.email, role=user_details.role, default_worker_tag=user_details.default_worker_tag, can_schedule_jobs=user_details.can_schedule_jobs, can_prioritize_jobs=user_details.can_prioritize_jobs, can_assign_jobs=user_details.can_assign_jobs, can_create_collections=user_details.can_create_collections, is_api_enabled=user_details.is_api_enabled, default_credential_id=user_details.default_credential_id, is_account_locked=user_details.is_account_locked, is_active=user_details.is_active, is_validated=user_details.is_validated, time_zone=user_details.time_zone, language=user_details.language, can_create_and_update_dcm=user_details.can_create_and_update_dcm, can_share_for_execution_dcm=user_details.can_share_for_execution_dcm, can_share_for_collaboration_dcm=user_details.can_share_for_collaboration_dcm, can_manage_generic_vaults_dcm=user_details.can_manage_generic_vaults_dcm, ) api_response = self.users_api.users_update_user(user_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
  • Registers the 'update_user_details' tool with the MCP server via the @app.tool() decorator. This defines the tool's entry point, including its signature and docstring, and delegates execution to the underlying tools instance method.
    @self.app.tool() def update_user_details(user_id: str, first_name: str, last_name: str, email: str): """Update details of an existing user by their ID""" return self.tools.update_user_details(user_id, first_name, last_name, email)

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/jupiterbak/AYX-MCP-Wrapper'

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