apps_get
Retrieve detailed analytics configuration for a specific Piwik PRO app, including settings like URLs, timezone, currency, and GDPR compliance.
Instructions
Get detailed information about a specific app.
Args:
app_id: UUID of the app to retrieve
Returns:
Dictionary containing detailed app information including:
- id: App UUID
- name: App name
- urls: List of URLs where the app is available
- app_type: Type of application
- timezone: App timezone
- currency: App currency
- gdpr_enabled: Whether GDPR is enabled
- gdpr_data_anonymization: Whether GDPR data anonymization is enabled
- real_time_dashboards: Whether real-time dashboards are enabled
- created_at: App creation datetime
- updated_at: App last update datetime
For more details use also get_app_tracker_settings tool.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app_id | Yes |
Implementation Reference
- The MCP tool handler function 'apps_get' decorated with @mcp.tool, implementing the tool by delegating to get_app_details(app_id). This is the exact implementation of the tool named "apps_get".
@mcp.tool(annotations={"title": "Piwik PRO: Get App", "readOnlyHint": True}) def apps_get(app_id: str) -> AppDetailsMCPResponse: """Get detailed information about a specific app. Args: app_id: UUID of the app to retrieve Returns: Dictionary containing detailed app information including: - id: App UUID - name: App name - urls: List of URLs where the app is available - app_type: Type of application - timezone: App timezone - currency: App currency - gdpr_enabled: Whether GDPR is enabled - gdpr_data_anonymization: Whether GDPR data anonymization is enabled - real_time_dashboards: Whether real-time dashboards are enabled - created_at: App creation datetime - updated_at: App last update datetime For more details use also get_app_tracker_settings tool. """ return get_app_details(app_id) - Pydantic model defining the output response schema for the apps_get tool.
class AppDetailsMCPResponse(BaseModel): """MCP-specific app details response that matches documented schema.""" id: str = Field(..., description="App UUID") name: str = Field(..., description="App name") urls: List[str] = Field(..., description="List of URLs where the app is available") app_type: Optional[str] = Field(None, description="Type of application") timezone: Optional[str] = Field(None, description="App timezone") currency: Optional[str] = Field(None, description="App currency") gdpr_enabled: Optional[bool] = Field(None, description="Whether GDPR is enabled") gdpr_data_anonymization: Optional[bool] = Field(None, description="GDPR data anonymization setting") real_time_dashboards: Optional[bool] = Field(None, description="Real-time dashboards enabled") created_at: Optional[datetime] = Field(None, description="Creation timestamp") updated_at: Optional[datetime] = Field(None, description="Last update timestamp") - Supporting helper function containing the core logic for fetching and mapping app details from the Piwik PRO API client.
def get_app_details(app_id: str) -> AppDetailsMCPResponse: try: client = create_piwik_client() response = client.apps.get_app(app_id) app_data = response["data"] attrs = app_data["attributes"] return AppDetailsMCPResponse( id=app_data["id"], name=attrs["name"], urls=attrs["urls"], app_type=attrs.get("appType"), timezone=attrs.get("timezone"), currency=attrs.get("currency"), gdpr_enabled=attrs.get("gdpr"), gdpr_data_anonymization=attrs.get("gdprDataAnonymization"), real_time_dashboards=attrs.get("realTimeDashboards"), created_at=attrs.get("addedAt"), updated_at=attrs.get("updatedAt"), ) except NotFoundError: raise RuntimeError(f"App with ID {app_id} not found") except Exception as e: raise RuntimeError(f"Failed to get app details: {str(e)}") - src/piwik_pro_mcp/tools/__init__.py:29-29 (registration)Registration call to register_app_tools(mcp) within register_all_tools, which defines and registers the apps_get tool.
register_app_tools(mcp)