versions_list
Retrieve and manage version history for Piwik PRO Tag Manager apps to track changes, review configurations, and maintain audit trails.
Instructions
List versions for an app in Piwik PRO Tag Manager.
Args:
app_id: UUID of the app
limit: Maximum number of versions to return (default: 10)
offset: Number of versions to skip (default: 0)
Returns:
Dictionary containing version list and metadata including:
- data: List of version objects with id, name, version_type, and timestamps
- meta: Metadata with pagination information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes | ||
| limit | No | ||
| offset | No |
Implementation Reference
- The main handler function for the 'versions_list' MCP tool. It is decorated with @mcp.tool for registration, defines input schema via type hints and docstring, and delegates execution to the list_versions helper.@mcp.tool(annotations={"title": "Piwik PRO: List Versions", "readOnlyHint": True}) def versions_list( app_id: str, limit: int = 10, offset: int = 0, ) -> TagManagerListResponse: """List versions for an app in Piwik PRO Tag Manager. Args: app_id: UUID of the app limit: Maximum number of versions to return (default: 10) offset: Number of versions to skip (default: 0) Returns: Dictionary containing version list and metadata including: - data: List of version objects with id, name, version_type, and timestamps - meta: Metadata with pagination information """ return list_versions(app_id=app_id, limit=limit, offset=offset)
- Core helper function that performs the actual API call to list Tag Manager versions using the Piwik PRO client.def list_versions( app_id: str, limit: int = 10, offset: int = 0, ) -> TagManagerListResponse: try: client = create_piwik_client() response = client.tag_manager.list_versions(app_id=app_id, limit=limit, offset=offset) return TagManagerListResponse(**response) except Exception as e: raise RuntimeError(f"Failed to list versions: {str(e)}")
- src/piwik_pro_mcp/tools/__init__.py:38-38 (registration)Registration call to register_version_tools(mcp), which defines and registers the versions_list tool (and others) with the MCP server.register_version_tools(mcp)
- src/piwik_pro_mcp/tools/tag_manager/versions.py:101-120 (registration)Direct registration via @mcp.tool decorator on the handler function inside register_version_tools.@mcp.tool(annotations={"title": "Piwik PRO: List Versions", "readOnlyHint": True}) def versions_list( app_id: str, limit: int = 10, offset: int = 0, ) -> TagManagerListResponse: """List versions for an app in Piwik PRO Tag Manager. Args: app_id: UUID of the app limit: Maximum number of versions to return (default: 10) offset: Number of versions to skip (default: 0) Returns: Dictionary containing version list and metadata including: - data: List of version objects with id, name, version_type, and timestamps - meta: Metadata with pagination information """ return list_versions(app_id=app_id, limit=limit, offset=offset)