get_collection_by_id
Retrieve a specific collection using its unique ID in the AYX-MCP-Wrapper server, enabling precise access to workflow resources within the Alteryx ecosystem.
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)Core handler function in AYXMCPTools class that retrieves a collection by ID using the Alteryx CollectionsApi and returns a pretty-formatted response or error.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:126-129 (registration)Tool registration in MCPAlteryxServer class using FastMCP decorator, defining a thin wrapper that delegates to the tools instance's get_collection_by_id method.@self.app.tool() def get_collection_by_id(collection_id: str): """Get a collection by its ID""" return self.tools.get_collection_by_id(collection_id)