remove_workflow_from_collection
Eliminate a specific workflow from a collection by providing the collection and workflow IDs using this tool in the AYX-MCP-Wrapper server.
Instructions
Remove a workflow from a collection by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes | ||
| workflow_id | Yes |
Implementation Reference
- src/tools.py:98-110 (handler)Core handler function that validates the collection and workflow exist, then calls the Alteryx Collections API to remove the workflow from the collection.def remove_workflow_from_collection(self, collection_id: str, workflow_id: str): """Remove a workflow from a collection by its ID""" try: collection = self.collections_api.collections_get_collection(collection_id) if not collection: return "Error: Collection not found" workflow = self.workflows_api.workflows_get_workflow(workflow_id) if not workflow: return "Error: Workflow not found" api_response = self.collections_api.collections_remove_workflow_from_collection(collection_id, workflow_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:151-154 (registration)MCP tool registration decorator and wrapper function that delegates execution to the AYXMCPTools instance.@self.app.tool() def remove_workflow_from_collection(collection_id: str, workflow_id: str): """Remove a workflow from a collection by its ID""" return self.tools.remove_workflow_from_collection(collection_id, workflow_id)
- src/mcp_server.py:152-154 (schema)Input schema inferred from function parameters: collection_id (str), workflow_id (str). Used by FastMCP for tool schema.def remove_workflow_from_collection(collection_id: str, workflow_id: str): """Remove a workflow from a collection by its ID""" return self.tools.remove_workflow_from_collection(collection_id, workflow_id)
- src/tools.py:98-110 (schema)Matching input schema in the handler implementation.def remove_workflow_from_collection(self, collection_id: str, workflow_id: str): """Remove a workflow from a collection by its ID""" try: collection = self.collections_api.collections_get_collection(collection_id) if not collection: return "Error: Collection not found" workflow = self.workflows_api.workflows_get_workflow(workflow_id) if not workflow: return "Error: Workflow not found" api_response = self.collections_api.collections_remove_workflow_from_collection(collection_id, workflow_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"