delete_collection
Remove a collection from Alteryx Server using its unique identifier to manage and organize workflow resources.
Instructions
Delete a collection by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes |
Implementation Reference
- src/tools.py:58-67 (handler)The core handler function that implements the delete_collection tool logic. It first checks if the collection exists, then calls the Alteryx collections API to delete it, and formats the response.def delete_collection(self, collection_id: str): """Delete a collection by its ID""" try: collection = self.collections_api.collections_get_collection(collection_id) if not collection: return "Error: Collection not found" api_response = self.collections_api.collections_delete_collection(collection_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:136-139 (registration)MCP tool registration and thin handler wrapper that delegates to the AYXMCPTools instance's delete_collection method.@self.app.tool() def delete_collection(collection_id: str): """Delete a collection by its ID""" return self.tools.delete_collection(collection_id)
- src/mcp_server.py:136-139 (handler)The FastMCP @tool decorator registers this as the entry-point handler for the 'delete_collection' tool, which proxies the call to the underlying tools implementation.@self.app.tool() def delete_collection(collection_id: str): """Delete a collection by its ID""" return self.tools.delete_collection(collection_id)