Skip to main content
Glama

analyticsadmin.properties.delete

Marks an Analytics property as trashed and returns its deleted state; restore it via Trash Can before expiration to prevent permanent purge.

Instructions

Marks target Property as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted properties. However, they can be restored using the Trash Can UI. If the properties are not restored before the expiration time, the Property and all child resources (eg: GoogleAdsLinks, Streams, AccessBindings) will be permanently purged. https://support.google.com/analytics/answer/6154772 Returns an error if the target is not found [HTTP DELETE] — removes the resource; irreversible unless the API documents a trash/undo flow; refused under --readonly safety profiles. Returns the post-delete resource state (or empty) as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: acknowledgeUserDataCollection, create, get, getDataRetentionSettings, list, patch, runAccessReport, updateDataRetentionSettings.

Input Schema

NameRequiredDescriptionDefault
nameYes[URL path segment] Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: "properties/1000"
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.

Output Schema

NameRequiredDescriptionDefault
nameNo
parentNo
accountNo
timeZoneNo
createTimeNo
deleteTimeNo
expireTimeNo
updateTimeNo
displayNameNo
currencyCodeNo
propertyTypeNo
serviceLevelNo
industryCategoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / name / description
      Previous value: -"Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\""New value: +"[URL path segment] Required. The name of the Property to soft-delete. Format: properties/{property_id} Example: \"properties/1000\""
    • addedInput schema / properties / name / pattern
      Added value: +"^properties/[^/]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "account": {
      +      "type": "string"
      +    },
      +    "createTime": {
      +      "type": "string"
      +    },
      +    "currencyCode": {
      +      "type": "string"
      +    },
      +    "deleteTime": {
      +      "type": "string"
      +    },
      +    "displayName": {
      +      "type": "string"
      +    },
      +    "expireTime": {
      +      "type": "string"
      +    },
      +    "industryCategory": {
      +      "enum": [
      +        "INDUSTRY_CATEGORY_UNSPECIFIED",
      +        "AUTOMOTIVE",
      +        "BUSINESS_AND_INDUSTRIAL_MARKETS",
      +        "FINANCE",
      +        "HEALTHCARE",
      +        "TECHNOLOGY",
      +        "TRAVEL",
      +        "OTHER",
      +        "ARTS_AND_ENTERTAINMENT",
      +        "BEAUTY_AND_FITNESS",
      +        "BOOKS_AND_LITERATURE",
      +        "FOOD_AND_DRINK",
      +        "GAMES",
      +        "HOBBIES_AND_LEISURE",
      +        "HOME_AND_GARDEN",
      +        "INTERNET_AND_TELECOM",
      +        "LAW_AND_GOVERNMENT",
      +        "NEWS",
      +        "ONLINE_COMMUNITIES",
      +        "PEOPLE_AND_SOCIETY",
      +        "PETS_AND_ANIMALS",
      +        "REAL_ESTATE",
      +        "REFERENCE",
      +        "SCIENCE",
      +        "SPORTS",
      +        "JOBS_AND_EDUCATION",
      +        "SHOPPING"
      +      ],
      +      "type": "string"
      +    },
      +    "name": {
      +      "type": "string"
      +    },
      +    "parent": {
      +      "type": "string"
      +    },
      +    "propertyType": {
      +      "enum": [
      +        "PROPERTY_TYPE_UNSPECIFIED",
      +        "PROPERTY_TYPE_ORDINARY",
      +        "PROPERTY_TYPE_SUBPROPERTY",
      +        "PROPERTY_TYPE_ROLLUP"
      +      ],
      +      "type": "string"
      +    },
      +    "serviceLevel": {
      +      "enum": [
      +        "SERVICE_LEVEL_UNSPECIFIED",
      +        "GOOGLE_ANALYTICS_STANDARD",
      +        "GOOGLE_ANALYTICS_360"
      +      ],
      +      "type": "string"
      +    },
      +    "timeZone": {
      +      "type": "string"
      +    },
      +    "updateTime": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and largely meets it: it discloses that the delete is a soft-delete, that restoration is only possible through the UI, that child resources (GoogleAdsLinks, Streams, AccessBindings) are permanently purged after expiration, and that it errors when the target is missing. It lacks permission/authorization requirements, and the appended boilerplate about request bodies and --readonly profiles is generic filler that does not describe this tool's actual behavior.

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?

The core documentation paragraphs are front-loaded and substantive, but the tail contains fabricated CLI-style boilerplate ("[HTTP DELETE] — removes the resource", "request bodies are built from the typed parameters") that is irrelevant to a DELETE with no body and dilutes the useful content. The useful text could be half as long.

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

Completeness4/5

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

Given an output schema exists and annotations are absent, the description supplies the essential safety context: soft-delete semantics, irreversibility, child-resource purge, and the not-found error. It omits required permissions or scope, which an agent would need before attempting a destructive call.

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

Parameters5/5

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

Schema coverage is 100%, including a regex pattern and a format example for `name`, so the schema already documents the sole meaningful parameter. The description adds no conflicting or redundant parameter detail; the passing mention of `params` and `body_file` is generic boilerplate, not a claim about this call.

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

Purpose5/5

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

The opening sentence names a specific verb and resource ("Marks target Property as soft-deleted (ie: 'trashed')") and states it returns the mutated resource. This distinguishes it from the siblings that also operate on a Property, such as patch, get, and acknowledgeUserDataCollection, because it is explicitly a trash operation rather than an update or read.

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

Usage Guidelines4/5

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

It gives clear context for when this operation is called (trashing a Property) and warns that there is no API restore path, only the Trash Can UI. It does not contrast this with alternatives on the same resource (e.g., patch vs. delete), so the guidance covers the situation but not the decision between similar tools.

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