Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

folders_entities

Lists all tags, triggers, and variables in a specified Google Tag Manager folder, automatically following pagination to return every entity across API pages.

Instructions

List all entities (tags, triggers, variables) within a specific GTM folder. Automatically follows pagination to return all entities.

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>",
      "folderId": "<folderId>"
    },
    "name": "folders_entities"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderIdYes
maxPagesNoMaximum number of API pages to fetch (default 50). GTM returns one nextPageToken for tags, triggers and variables together, so this bounds the whole walk rather than each collection.
accountIdYes
pageTokenNoContinuation token to resume listing from a previous truncated result.
containerIdYes
workspaceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / accountId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / containerId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / folderId / pattern
      Added value: +"^\\d+$"
    • addedInput schema / properties / maxPages / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / workspaceId / pattern
      Added value: +"^\\d+$"
  2. Changed2 schema fields changedv1.451.2
    • addedInput schema / properties / maxPages
      Added value: +{
      +  "description": "Maximum number of API pages to fetch (default 50). GTM returns one nextPageToken for tags, triggers and variables together, so this bounds the whole walk rather than each collection.",
      +  "exclusiveMinimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / pageToken
      Added value: +{
      +  "description": "Continuation token to resume listing from a previous truncated result.",
      +  "type": "string"
      +}
  3. First observedv1.0.0

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses that pagination is followed automatically, but says nothing about what happens on truncation, whether maxPages caps or errors, or how partial results surface - the schema's pageToken and maxPages fields hint at truncation the description never explains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the resource and scope. The pagination sentence earns its place by disclosing behavior, though it slightly restates 'all entities' and omits the truncation caveat that would make it fully useful.

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

Completeness3/5

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

For a six-parameter, no-output-schema, no-annotation read tool this is minimum viable: the core purpose and pagination behavior are covered, but the required hierarchy IDs and the truncation/resumption contract are left to the schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33% across six parameters. The description adds meaning only for folderId (the folder scope) and implicitly for pagination; the four required identifier parameters (accountId, containerId, workspaceId, folderId) receive no explanation, leaving the low-coverage gap largely uncompensated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource - 'List all entities (tags, triggers, variables)' - scoped to 'a specific GTM folder'. It clarifies exactly what is enumerated, which distinguishes it from a generic folder read, though it never names a sibling (e.g. folders_move_entities) as a contrast.

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

Usage Guidelines3/5

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

Usage is implied by the 'within a specific GTM folder' scoping but there is no explicit when-to-use, when-not-to-use, or alternative named. An agent must infer that this is the read path for folder contents versus folders_get or built_in_variables_list.

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