Skip to main content
Glama

analyticsadmin.properties.updateDataRetentionSettings

Update a Google Analytics property's data retention settings to change event and user data retention periods and reset-user-data behavior via PATCH.

Instructions

Updates the singleton data retention settings for this property [HTTP PATCH] — updates the resource; refused under --readonly safety profiles. Returns the API's response resource as JSON — request body is a JSON GoogleAnalyticsAdminV1betaDataRetentionSettings object accepting eventDataRetention, name, resetUserDataOnNewActivity, userDataRetention; pass it via params or whole via body_file Siblings over the same resource: acknowledgeUserDataCollection, create, delete, get, getDataRetentionSettings, list, patch, runAccessReport.

Input Schema

NameRequiredDescriptionDefault
nameYes[URL path segment] Identifier. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings
queryNoExtra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe.
paramsNoParameter map merged into the request; typed parameters win.
dry_runNoReturn the request that would be sent, without sending it.
body_fileNoRead the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON GoogleAnalyticsAdminV1betaDataRetentionSettings object.
updateMaskNo[query parameter] Required. The list of fields to be updated. Field names must be in snake case (e.g., "field_to_update"). Omitted fields will not be updated. To replace the enti
request_bodyNoRequest body of type GoogleAnalyticsAdminV1betaDataRetentionSettings: pass it via `params` (merged into the built body) or whole via `body_file`.

Output Schema

NameRequiredDescriptionDefault
nameNo
userDataRetentionNo
eventDataRetentionNo
resetUserDataOnNewActivityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / body_file / description
      Previous value: -"Read the request body from this file ('-' for stdin) instead of building one from the parameters."New value: +"Read the request body from this file ('-' for stdin) instead of building one from the parameters. The body is a JSON GoogleAnalyticsAdminV1betaDataRetentionSettings object."
    • addedInput schema / properties / request_body
      Added value: +{
      +  "description": "Request body of type GoogleAnalyticsAdminV1betaDataRetentionSettings: pass it via `params` (merged into the built body) or whole via `body_file`.",
      +  "properties": {
      +    "eventDataRetention": {
      +      "enum": [
      +        "RETENTION_DURATION_UNSPECIFIED",
      +        "TWO_MONTHS",
      +        "FOURTEEN_MONTHS",
      +        "TWENTY_SIX_MONTHS",
      +        "THIRTY_EIGHT_MONTHS",
      +        "FIFTY_MONTHS"
      +      ],
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "resetUserDataOnNewActivity": {
      +      "type": "boolean"
      +    },
      +    "userDataRetention": {
      +      "enum": [
      +        "RETENTION_DURATION_UNSPECIFIED",
      +        "TWO_MONTHS",
      +        "FOURTEEN_MONTHS",
      +        "TWENTY_SIX_MONTHS",
      +        "THIRTY_EIGHT_MONTHS",
      +        "FIFTY_MONTHS"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Changed5 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Identifier. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings"New value: +"[URL path segment] Identifier. Resource name for this DataRetentionSetting resource. Format: properties/{property}/dataRetentionSettings"
    • addedInput schema / properties / name / pattern
      Added value: +"^properties/[^/]+/dataRetentionSettings$"
    • changedInput schema / properties / updateMask / description
      Previous value: -"Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"New value: +"[query parameter] Required. The list of fields to be updated. Field names must be in snake case (e.g., \"field_to_update\"). Omitted fields will not be updated. To replace the enti"
    • addedInput schema / properties / updateMask / format
      Added value: +"google-fieldmask"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "eventDataRetention": {
      +      "enum": [
      +        "RETENTION_DURATION_UNSPECIFIED",
      +        "TWO_MONTHS",
      +        "FOURTEEN_MONTHS",
      +        "TWENTY_SIX_MONTHS",
      +        "THIRTY_EIGHT_MONTHS",
      +        "FIFTY_MONTHS"
      +      ],
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "resetUserDataOnNewActivity": {
      +      "type": "boolean"
      +    },
      +    "userDataRetention": {
      +      "enum": [
      +        "RETENTION_DURATION_UNSPECIFIED",
      +        "TWO_MONTHS",
      +        "FOURTEEN_MONTHS",
      +        "TWENTY_SIX_MONTHS",
      +        "THIRTY_EIGHT_MONTHS",
      +        "FIFTY_MONTHS"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must carry the full burden. It does disclose useful traits — 'refused under --readonly safety profiles' signals this is a write operation blocked in read-only contexts, and it states the response is JSON. It does not explain whether the update is partial vs full replacement (a key concern for a mutation), what permissions are needed, or reversibility.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, which is good, but the definition is a dense em-dash-laden run-on that crams body construction, return format, and a long sibling list into one paragraph. The sibling enumeration adds clutter without differential value; some trimming would sharpen it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given output schema exists (so return values needn't be explained) and the mutation/no-annotation profile, the description covers purpose, body shape, and readonly refusal adequately. It stops short of the specifics an agent would want for a mutation — partial-update semantics and updateMask relevance — leaving a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (7 params, nested request_body with enums documented in schema), so the schema does the heavy lifting. The description reiterates the body fields (eventDataRetention, name, resetUserDataOnNewActivity, userDataRetention) and how to pass the body, but adds no syntax or constraint meaning beyond the schema, warranting the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Updates') and resource ('singleton data retention settings for this property') and notes the HTTP PATCH semantics. It's clear what the tool does, though the trailing sibling list (acknowledgeUserDataCollection, create, delete, get, getDataRetentionSettings, patch, etc.) names alternatives without explaining how they differ, leaving the get/settings distinction to inference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied (updates existing retention settings), and it offers invocation guidance ('pass it via params or whole via body_file'). However, there's no explicit when-to-use vs the sibling getDataRetentionSettings or the general properties.patch, and no exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools