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: List variables — MCP tool

Google Tag Manager MCP tool: Lists the user-defined variables of a workspace (built-in variables live in manage_built_in_variables).

Technical name: list_variables

What task it solves

I want to list variables.

Lists the user-defined variables of a workspace (built-in variables live in manage_built_in_variables).

When to use it

Use this capability when you need “List variables” 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), e.g. from list_workspaces.
  • page_tokenoptional. Pagination token from a previous response's nextPageToken. Omit for the first page.

What it returns

Returns { variable: [{ variableId, name, type (e.g.

What changes in Google Tag Manager

The tool reads Google Tag Manager data and does not change it.

Example request

List variables in Google Tag Manager. Ask for any required identifiers that are missing.

Errors and limitations

v = data layer, jsm = custom JS, c = constant), parameter, path, fingerprint }], nextPageToken }.

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

Related MCP tools

Technical details