get_user_by_name
Retrieve user details by entering their last name through AYX-MCP-Wrapper, enabling efficient user management and data access within Alteryx Servers.
Instructions
Get a user by their last name
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/tools.py:379-385 (handler)The core implementation of the get_user_by_name tool. It queries the Alteryx Server Users API using the last_name parameter to retrieve matching users and returns a pretty-formatted response or an error message.def get_user_by_name(self, name: str): """Get a user by their last name""" try: api_response = self.users_api.users_get_users(last_name=name) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:246-249 (registration)Registers the get_user_by_name tool with the FastMCP server using the @app.tool() decorator. This thin wrapper delegates the execution to the underlying AYXMCPTools.get_user_by_name method.@self.app.tool() def get_user_by_name(name: str): """Get a user by their last name""" return self.tools.get_user_by_name(name)