delete_collection
Remove a specific collection by its ID using the AYX-MCP-Wrapper server to manage Alteryx resources efficiently.
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 in the AYXMCPTools class that implements the deletion logic by first verifying the collection exists and then calling the Alteryx collections API delete method.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)The registration of the 'delete_collection' tool in the MCP server using the @app.tool() decorator, which creates a wrapper that delegates to the underlying tools instance.@self.app.tool() def delete_collection(collection_id: str): """Delete a collection by its ID""" return self.tools.delete_collection(collection_id)