Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_archive_custom_metric

Archives a GA4 custom metric to permanently remove it from active reporting; no un-archive is available, and it requires confirm=true with deletes enabled.

Instructions

[GA4 DELETE] Archive a custom metric (there is no hard delete). Archiving is effectively permanent (no un-archive). Requires GA4_MCP_ENABLE_DELETES=true and confirm=true.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "confirm": "<confirm>"
    },
    "name": "ga4_archive_custom_metric"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFull resource name of the custom metric to target: "properties/{property}/customMetrics/{id}".
confirmYesMust be true to archive.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / name / description
      Previous value: -"Full resource name of the custom metric to target, e.g. \"properties/123/…/456\"."New value: +"Full resource name of the custom metric to target: \"properties/{property}/customMetrics/{id}\"."
    • removedInput schema / properties / name / minLength
      Removed value: -1
    • addedInput schema / properties / name / pattern
      Added value: +"^\\s*properties\\/\\d+\\/customMetrics\\/[A-Za-z0-9_-]+\\s*$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. Addedv1.160.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does well: it discloses that archiving is irreversible ("no un-archive"), that this is destructive-by-substitution for delete, and that an environment flag plus confirm=true are required. It does not say what happens to reports or dashboards that reference the archived metric, which is the main residual gap for a destructive operation.

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

Conciseness5/5

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

A single tightly packed sentence: the destructive classification is front-loaded in the bracketed tag, the core action follows, and the irreversibility and prerequisite conditions come after. Every clause carries information an agent needs before calling.

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?

For a two-parameter, fully documented, non-idempotent mutation with no output schema, the description covers action, permanence, and gating requirements adequately. It is only slightly short of complete because the downstream effect on existing reporting that references the metric is unstated.

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 description coverage is 100%, so both the resource-name pattern and the confirm flag are already fully documented in the schema. The description reinforces the confirm=true requirement but adds no format or usage detail beyond what structured fields already supply, making the baseline score appropriate.

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 and resource ("Archive a custom metric") and clarifies the semantics by noting there is no hard delete, which separates it from a true delete tool. What it does not do is explicitly distinguish itself from sibling mutators such as ga4_update_custom_metric or ga4_create_custom_metric, leaving that differentiation to be inferred.

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?

Usage context is clear: this is the path to take when a custom metric must be removed, since no hard delete exists. It also states the operational prerequisites (GA4_MCP_ENABLE_DELETES=true and confirm=true), which effectively gate the call. It stops short of naming alternatives such as updating the metric instead of archiving it, so there are no explicit when-not guidelines.

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