Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_create_audience

Creates a GA4 audience using filter clauses and optional settings; requires write access enabled and confirm=true to apply the change.

Instructions

[GA4 WRITE] Create an audience. Pass the filterClauses via body (see the Admin API Audience shape). Requires GA4_MCP_ENABLE_WRITES=true and confirm=true.

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": {
      "property": "<property>",
      "confirm": "<confirm>"
    },
    "name": "ga4_create_audience"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoRaw request-body object (JSON) merged OVER the typed fields — use for nested/advanced fields not exposed as flat args.
confirmYesMust be true to apply the change.
propertyYesGA4 property ID, e.g. "123456789" or "properties/123456789".
descriptionNo
displayNameNo
membershipDurationDaysNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.497.5
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / body / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / property / minLength
      Removed value: -1
    • addedInput schema / properties / property / pattern
      Added value: +"^\\s*(properties\\/)?\\d+\\s*$"
  2. Addedv1.421.0
  3. Removedv1.350.0
  4. Addedv1.160.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose a genuinely useful behavioral trait: the tool is write-gated behind an environment flag plus an explicit confirm parameter, which an agent could not infer from the schema alone. However, it says nothing about failure behavior, whether the created audience is active immediately, idempotency on repeat calls, or what the response contains.

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?

Three short sentences with the write tag and core action front-loaded, followed by the parameter hint and the prerequisites. No filler; the only minor cost is that the substantive guidance lives in a parenthetical pointer to external documentation.

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

Completeness4/5

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

For a write tool with no output schema, six parameters, and a nested body object, the definition covers the essentials: what it does, where the complex payload goes, and the two conditions required for the call to succeed. The remaining gap is that the agent must consult external Admin API docs to construct a valid `body`, but that is an acknowledged and reasonable delegation.

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

Parameters3/5

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

Schema coverage is 50%: body, confirm, and property are documented in the schema, while displayName, description, and membershipDurationDays carry no descriptions anywhere. The description adds real value by revealing that filterClauses must be nested inside `body` rather than passed flat, but it defers the full body shape to an external Admin API reference and leaves the three undocumented flat parameters unexplained.

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?

States a specific verb and resource ('Create an audience') and prefixes it with '[GA4 WRITE]', which immediately separates it from read tools and from ga4_update_audience/ga4_archive_audience in the sibling list. It does not explicitly name an alternative, but the create-vs-update distinction is unambiguous from the verb.

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?

Provides concrete gating conditions — GA4_MCP_ENABLE_WRITES=true and confirm=true — which tells the agent the preconditions for a successful call. It does not say when to prefer ga4_update_audience over creating a new audience, or how to discover existing audiences before creating a duplicate, so the when-not guidance is absent.

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