get_collection_by_id
Retrieve a specific collection from Alteryx Servers using its unique identifier to access workflow groups and related resources.
Instructions
Get a collection by its ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collection_id | Yes |
Implementation Reference
- src/tools.py:41-47 (handler)The core handler function in AYXMCPTools class that retrieves a specific collection from the Alteryx server API using the collections_get_collection method and formats the response.def get_collection_by_id(self, collection_id: str): """Get a collection by its ID""" try: api_response = self.collections_api.collections_get_collection(collection_id) return pprint.pformat(api_response) except ApiException as e: return f"Error: {e}"
- src/mcp_server.py:127-129 (registration)MCP tool registration using @app.tool() decorator in MCPAlteryxServer class, providing a thin wrapper that delegates to the tools instance's get_collection_by_id method.def get_collection_by_id(collection_id: str): """Get a collection by its ID""" return self.tools.get_collection_by_id(collection_id)