Skip to main content
Glama
Samarth GTM MCP Server

Samarth GTM MCP Server

Official

ga4_create_adsense_link

Creates an AdSense link for a specified GA4 property to connect AdSense data, requiring confirm=true and write access to apply the change.

Instructions

[GA4 WRITE] Create an AdSense link (no update). 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_adsense_link"
  }
}

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".
adClientCodeNoAdSense ad client code, e.g. "ca-pub-…".

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

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it usefully discloses the write gating mechanism (environment flag plus confirm=true) and that no update path is offered. It does not say whether the call is idempotent, what happens if a link already exists, whether the operation is reversible, 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?

Two short sentences with the write nature and gating requirements front-loaded via the [GA4 WRITE] prefix. Nothing is redundant, though the parenthetical "(no update)" is slightly opaque without context.

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 4-parameter mutation with no annotations and no output schema, the essentials an agent needs to avoid a failed call (write flag, confirm) are present, and the schema covers parameter formats. What is missing is any statement of effect — what the link configures on the property and what a successful call yields.

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 description coverage is 100%, so all four parameters (property, adClientCode, confirm, body) are already documented with formats and examples in the schema. The description only echoes the confirm=true requirement and adds nothing about property ID formatting or the body override object; baseline 3 is appropriate given the schema does the work.

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 states a specific verb and resource ("Create an AdSense link") and adds the qualifier "(no update)", which signals this is create-only and implicitly separates it from update-style siblings and from ga4_delete_adsense_link. It does not name any alternative tool, but the operation is unambiguous.

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 only implied by preconditions: the tool exists for creating AdSense links and requires GA4_MCP_ENABLE_WRITES=true plus confirm=true. There is no explicit guidance about when to choose this over the delete sibling or over destinations_link, and no stated prerequisite that the property must not already have an AdSense link.

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