Skip to main content
Glama

analyticsadmin.accounts.delete

Soft-delete a Google Analytics account by moving it to Trash, where it remains recoverable only via the Trash Can UI before permanent purge.

Instructions

Marks target Account as soft-deleted (ie: "trashed") and returns it. This API does not have a method to restore soft-deleted accounts. However, they can be restored using the Trash Can UI. If the accounts are not restored before the expiration time, the account and all child resources (eg: Properties, 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: get, getDataSharingSettings, list, patch, provisionAccountTicket, runAccessReport, searchChangeHistoryEvents.

Input Schema

NameRequiredDescriptionDefault
nameYes[URL path segment] Required. The name of the Account to soft-delete. Format: accounts/{account} Example: "accounts/100"
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

No arguments

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 Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\""New value: +"[URL path segment] Required. The name of the Account to soft-delete. Format: accounts/{account} Example: \"accounts/100\""
    • addedInput schema / properties / name / pattern
      Added value: +"^accounts/[^/]+$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

No annotations are present, so the description carries the full burden and largely meets it: soft-delete vs permanent purge, child resources affected, the absence of a programmatic undo, the not-found error, and the returned post-delete state are all disclosed. Gaps remain on required permissions/authorization and the actual expiration window (deferred to a support URL), and the appended boilerplate calling DELETE "irreversible" sits in mild tension with the trash/undo flow described in the first sentence.

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 information is front-loaded well, but the entry bloats with a bare support URL, a generic "HTTP DELETE — removes the resource" gloss that repeats the first sentence, and a paragraph about request-body construction that is boilerplate across this tool family. Several sentences are reusable filler rather than tool-specific signal.

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?

An output schema exists, so return shape need not be spelled out, and the destructive consequence chain (trash → purge → children removed) is covered thoroughly. What is missing for a destructive, admin-level operation with no annotations is authorization prerequisites and a concrete expiration timeframe, both of which the agent would need before deciding to call it.

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%, so all five parameters including the required `name` pattern are already documented in the schema, which sets the baseline at 3. The description's note about typed parameters winning over `params` and `body_file` supplying a whole body largely restates the schema field descriptions rather than adding new semantics.

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?

States a specific verb and resource ("Marks target Account as soft-deleted") and clarifies the exact semantics with the "trashed" synonym. The closing line enumerates the sibling operations over the same resource (get, list, patch, provisionAccountTicket, runAccessReport, searchChangeHistoryEvents), so an agent can distinguish it from them without opening a schema.

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?

Gives concrete decision context: there is no API-level restore, restoration must go through the Trash Can UI, and unrecovered accounts are purged with all children after expiration. It also names the sibling set for the same resource, but it never states positively when to choose delete versus, say, patch or a read-only sibling — the agent must infer.

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