update_collection_name_or_owner
Modify a collection's name or transfer ownership by specifying its ID, enabling administrators to update organizational records.
Instructions
Update a collection name or owner by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | ||
| name | Yes | ||
| owner_id | Yes |
Implementation Reference
- src/tools.py:69-81 (handler)Core handler function implementing the update_collection_name_or_owner tool logic using Alteryx server API.def update_collection_name_or_owner(self, collection_id: str, name: str, owner_id: str): """Update a collection name or owner by its ID""" try: collection = self.collections_api.collections_get_collection(collection_id) if not collection: return "Error: Collection not found" contract = server_client.UpdateCollectionContract( name=name if name else collection.name, owner_id=owner_id if owner_id else collection.owner_id ) api_response = self.collections_api.collections_update_collection(collection_id, contract) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:141-144 (registration)MCP tool registration decorator and wrapper function that calls the handler in tools.py.@self.app.tool() def update_collection_name_or_owner(collection_id: str, name: str, owner_id: str): """Update a collection name or owner by its ID""" return self.tools.update_collection_name_or_owner(collection_id, name, owner_id)