templates_describe_fields
Read a custom or gallery GTM template's real field definitions—parameter keys, widget types, labels, required flags, options, and tagType—before creating tags, so you avoid guessed parameters.
Instructions
Read the FIELDS a custom or Community Gallery template accepts, straight from the template's own source. Call this after templates_import_from_gallery and BEFORE tags_create, so the tag is built with that template's real parameter keys instead of guessed ones. Returns each field's name (the key for the tag's parameter array), its widget type, its label, whether it is required, and any fixed options. Also returns the template's tagType, so one call gives everything tags_create needs. Read-only. Only works for custom and gallery templates: GTM's ~68 BUILT-IN vendor templates carry no source, so for those use tags_type_profile against a container that already has one.
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>",
"containerId": "<containerId>",
"workspaceId": "<workspaceId>",
"templateId": "<templateId>"
},
"name": "templates_describe_fields"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accountId | Yes | The GTM account ID. | |
| templateId | Yes | The template ID, from templates_list. | |
| containerId | Yes | The GTM container ID. | |
| workspaceId | Yes | The GTM workspace ID. |