apps_delete
Permanently delete an app and all associated data from Piwik PRO analytics. This irreversible action removes the specified app by its UUID.
Instructions
Delete an app from Piwik PRO analytics.
Warning: This action is irreversible and will permanently delete
all data associated with the app.
Args:
app_id: UUID of the app to delete
Returns:
Dictionary containing deletion status:
- status: "success" if deletion was successful
- message: Descriptive message about the deletion
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes |
Implementation Reference
- The MCP tool handler function 'apps_delete' decorated with @mcp.tool, which delegates to the delete_app helper.
@mcp.tool(annotations={"title": "Piwik PRO: Delete App"}) def apps_delete(app_id: str) -> OperationStatusResponse: """Delete an app from Piwik PRO analytics. Warning: This action is irreversible and will permanently delete all data associated with the app. Args: app_id: UUID of the app to delete Returns: Dictionary containing deletion status: - status: "success" if deletion was successful - message: Descriptive message about the deletion """ return delete_app(app_id) - Core helper function implementing the app deletion logic via Piwik PRO API client, handling errors.
def delete_app(app_id: str) -> OperationStatusResponse: try: client = create_piwik_client() client.apps.delete_app(app_id) return OperationStatusResponse(status="success", message=f"App {app_id} deleted successfully") except NotFoundError: raise RuntimeError(f"App with ID {app_id} not found") except BadRequestError as e: raise RuntimeError(f"Failed to delete app: {e.message}") except Exception as e: raise RuntimeError(f"Failed to delete app: {str(e)}") - src/piwik_pro_mcp/tools/__init__.py:29-29 (registration)Registration call to register_app_tools(mcp), which defines and registers the apps_delete tool among app management tools.
register_app_tools(mcp)