Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

user_permissions_update

Updates a user's Google Tag Manager account and container access levels, preserving omitted permissions while replacing container access when provided.

Instructions

[WRITE] Update a user's account and/or container access levels. Requires GTM_MCP_ENABLE_WRITES=true and confirm=true. Read-modify-write: an omitted accountPermission or containerAccess keeps the user's current value. containerAccess, when given, is the COMPLETE list (the API replaces the record): a container left out loses access. Removing access (noAccess at account or container level, or leaving a container out) is a revocation and also requires GTM_MCP_ENABLE_DELETES=true, the same as user_permissions_delete.

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": {
      "accountId": "<accountId>",
      "userPermissionId": "<userPermissionId>",
      "confirm": "<confirm>"
    },
    "name": "user_permissions_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true to confirm this write operation.
accountIdYesThe GTM account ID.
containerAccessNoPer-container access entries.
userPermissionIdYesThe user permission ID to update.
accountPermissionNoAccount-level permission.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / accountId / pattern
      Added value: +"^\\d+$"
    • removedInput schema / properties / containerAccess / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / containerAccess / items / properties / containerId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / userPermissionId / pattern
      Added value: +"^\\d+$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. First observedv1.0.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses the write gate, the confirm requirement, read-modify-write omission semantics, the destructive full-replacement behavior of containerAccess, and the deletion gate for revocations. It explicitly tells the agent what access gets destroyed and under which conditions, which is exactly the behavioral detail annotations would otherwise provide.

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?

Four sentences, front-loaded with the write marker and the verb, then prerequisites, then the read-modify-write rule, then the destructive replacement/revocation rule. Every sentence carries operational information; there is no restatement of schema fields or filler.

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

Completeness5/5

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

For a five-parameter mutation tool with no annotations and no output schema, the description covers gating, confirmation, omission behavior, and the destructive edge case. An agent can call this correctly and safely without consulting anything else, and return values are not needed for a permission upsert.

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%, so the baseline would be 3, but the description adds meaning the schema cannot express: an omitted accountPermission or containerAccess preserves the current value, while containerAccess when supplied is treated as the complete list and replaces the record. Those replacement/omission semantics are the highest-risk ambiguity in this tool and are resolved in the description.

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 description opens with a bracketed [WRITE] marker and a specific verb+resource: "Update a user's account and/or container access levels." It scopes the operation to two permission surfaces, which makes it trivially distinguishable from user_permissions_create, user_permissions_get, and user_permissions_list.

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

Usage Guidelines5/5

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

It states explicit preconditions (GTM_MCP_ENABLE_WRITES=true and confirm=true) and, crucially, says that any revocation path (noAccess at either level, or omitting a container) additionally requires GTM_MCP_ENABLE_DELETES=true and behaves like user_permissions_delete. That is an explicit when-to-use-this-vs-the-delete-tool rule rather than implied guidance.

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