Connect the Google Tag Manager MCP server to your AI agent Open source, MIT, on npm. Setup instructions for Claude, Cursor and Codex are in the repository; adoption questions — Telegram. GitHub repository Telegram

Google Tag Manager: Create a tag, trigger or variable — MCP tool

Google Tag Manager MCP tool: Creates a tag, trigger or variable in a workspace.

Technical name: create_entity

What task it solves

I want to create a tag, trigger or variable.

Creates a tag, trigger or variable in a workspace.

When to use it

Use this capability when you need “Create a tag, trigger or variable” without doing the same work manually in the Google Tag Manager interface. It runs only when an AI client calls it.

What to provide

  • account_idrequired. GTM account id (string).
  • container_idrequired. Container id (string).
  • workspace_idrequired. Workspace id (string).
  • entity_typerequired. Which collection to create in.
  • bodyrequired. The resource JSON to create (name, type, parameter, and for tags firingTriggerId).

What it returns

Returns the created resource with its server-assigned id and fingerprint.

What changes in Google Tag Manager

The tool changes real Google Tag Manager data as described above. The server does not promise an automatic rollback.

Example request

Create a tag, trigger or variable in Google Tag Manager. Ask for any required identifiers that are missing.

Errors and limitations

body is the resource JSON: minimally { name, type } plus type-specific parameter entries; tags also take firingTriggerId (array of trigger id strings). Example tag body: { "name": "GA4 event", "type": "gaawe", "parameter": [...], "firingTriggerId": ["12"] }. Requires the tagmanager.edit.containers scope.

Access also depends on token permissions, quotas, and upstream API limits.

Related MCP tools

Technical details