Create GTM Tag
gtm_create_tagCreate a new tag in a Google Tag Manager workspace by specifying the account, container, workspace, tag name, type, and optional parameters.
Instructions
Create a new tag in a workspace.
Example parameters for GA4 event parameters (eventSettingsTable): {"key": "eventSettingsTable", "type": "list", "list": [{"type": "map", "map": [{"key": "parameter", "type": "template", "value": "method"}, {"key": "parameterValue", "type": "template", "value": "{{dlv - method}}"}]}]}
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": {
"account_id": "<account_id>",
"container_id": "<container_id>",
"workspace_id": "<workspace_id>",
"name": "<name>",
"type": "<type>"
},
"name": "gtm_create_tag"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the tag | |
| type | Yes | Tag type (e.g., 'html', 'img', 'ua', 'gaawe') | |
| account_id | Yes | The GTM account ID | |
| parameters | No | Array of parameter objects. Supports nested structures with list/map for complex parameters like eventSettingsTable | |
| container_id | Yes | The GTM container ID | |
| workspace_id | Yes | The GTM workspace ID | |
| firing_trigger_ids | No | Array of trigger IDs that fire this tag | |
| blocking_trigger_ids | No | Array of trigger IDs that block this tag |