Draft an Analytics annotation
draft_ga4_annotationDraft creating, changing or deleting a GA4 annotation (a note on a date or date range in GA4's charts), returning a PREVIEW.
Use it to mark what explains a change in the data: a site relaunch, a price change, a campaign start, a tracking fix. Create needs title and date; update and delete need the annotation's ID from list_ga4_annotations, and an update changes only the fields passed (the preview shows before and after). Annotations Google created itself cannot be changed. Nothing changes until confirm_and_apply applies it; the dry run re-reads the annotation and refuses if it was changed in GA4 after the preview. GA4 Admin API v1alpha (reportingDataAnnotations).
Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "draft_ga4_annotation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | The day as YYYY-MM-DD, or the first day of a range together with end_date. Required for create. | |
| color | No | BLUE (default on create), GREEN, RED, PURPLE, BROWN or CYAN. | |
| title | No | Up to 60 characters. Required for create. | |
| action | No | "create" (default), "update" or "delete". | create |
| end_date | No | Last day of a range (YYYY-MM-DD); leave empty for one day. | |
| annotation | No | ID or resource name of the annotation to update or delete (list_ga4_annotations). | |
| description | No | Up to 150 characters. On update, "" clears it. | |
| property_id | No | Numeric GA4 property ID, with or without the "properties/" prefix. If empty, uses the default from config. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||