list_property_annotations
Retrieve annotations for a Google Analytics property to document service releases, marketing campaigns, and traffic changes on specific dates.
Instructions
Returns annotations for a property.
Annotations are a feature that allows you to leave notes on GA4 for specific dates or periods.
They are typically used to record service releases, marketing campaign launches or changes,
and rapid traffic increases or decreases due to external factors.
Args:
property_id: The Google Analytics property ID. Accepted formats are:
- A number
- A string consisting of 'properties/' followed by a number
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| property_id | Yes |
Implementation Reference
- analytics_mcp/tools/admin/info.py:79-106 (handler)The handler function for the 'list_property_annotations' tool. It is decorated with @mcp.tool() which also serves as registration. Retrieves property annotations using Google Analytics Admin API v1alpha, paginates results, converts protos to dicts, and returns a list of annotations.@mcp.tool(title="Gets property annotations for a property") async def list_property_annotations( property_id: int | str, ) -> List[Dict[str, Any]]: """Returns annotations for a property. Annotations are a feature that allows you to leave notes on GA4 for specific dates or periods. They are typically used to record service releases, marketing campaign launches or changes, and rapid traffic increases or decreases due to external factors. Args: property_id: The Google Analytics property ID. Accepted formats are: - A number - A string consisting of 'properties/' followed by a number """ request = admin_v1alpha.ListReportingDataAnnotationsRequest( parent=construct_property_rn(property_id) ) annotations_pager = ( await create_admin_alpha_api_client().list_reporting_data_annotations( request=request ) ) all_pages = [ proto_to_dict(annotation_page) async for annotation_page in annotations_pager ] return all_pages