Skip to main content
Glama
kLOsk

AdLoop: Google Ads, Reddit Ads & GA4

Draft an Analytics key event

draft_key_event

Draft the marking of a GA4 event as a key event (conversion) and preview a plan before applying it to future data.

Instructions

Draft marking a GA4 event as a key event (conversion) — returns a PREVIEW.

The fix for "the event fires but isn't tracked as a conversion": attribution_check / validate_tracking diagnose it, this closes the loop. Applies to future data only. Returns a preview with a plan_id and warnings; nothing changes until confirm_and_apply applies it.

Google Analytics Data API: https://developers.google.com/analytics/devguides/reporting/data/v1 and Admin API: https://developers.google.com/analytics/devguides/config/admin/v1

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_nameYesName of the GA4 event to mark as a key event, exactly as it fires (e.g. "sign_up", "purchase"). Required.
property_idNoNumeric GA4 property ID, with or without the "properties/" prefix. If empty, uses the default from config.
counting_methodNoONCE_PER_EVENT (counts every occurrence, e.g. purchases) or ONCE_PER_SESSION (counts once per session, e.g. sign-ups). Defaults to ONCE_PER_EVENT.ONCE_PER_EVENT

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.27.1
    • addedInput schema / properties / counting_method / description
      Added value: +"ONCE_PER_EVENT (counts every occurrence, e.g.\npurchases) or ONCE_PER_SESSION (counts once per session, e.g.\nsign-ups). Defaults to ONCE_PER_EVENT."
    • addedInput schema / properties / event_name / description
      Added value: +"Name of the GA4 event to mark as a key event, exactly as it\nfires (e.g. \"sign_up\", \"purchase\"). Required."
    • addedInput schema / properties / property_id / description
      Added value: +"Numeric GA4 property ID, with or without the \"properties/\"\nprefix. If empty, uses the default from config."
  2. Addedv0.13.2
  3. Removedv0.13.0
  4. Addedv0.12.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=true. The description goes well beyond that: it discloses that the call returns a PREVIEW with a plan_id and warnings, that nothing changes until confirm_and_apply runs, and that the effect is limited to future data. These are the exact traits an agent needs to avoid treating this as an immediate mutation.

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

Conciseness5/5

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

Front-loaded purpose, then the workflow context, then the scope constraint, then the preview/confirm mechanics. Each sentence earns its place; the emphasis on PREVIEW is well placed for an agent skimming. The trailing documentation links are the only mild padding.

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?

With an output schema present and full parameter coverage, the description needn't explain return values — yet it usefully adds plan_id/warnings and the confirm gate. The staged draft/confirm contract, scope limitation, and diagnostic loop are all covered; permission requirements are the only notable omission and are not critical here.

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% with all three parameters (event_name, property_id, counting_method) fully documented including defaults and prefix handling. The description adds no parameter-level detail beyond the schema, so the baseline of 3 applies.

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

Purpose5/5

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

States a specific verb and resource: drafting the marking of a GA4 event as a key event (conversion). It is clearly distinguishable from siblings like list_key_events, draft_delete_key_event, and draft_create_conversion_action (which targets Google Ads conversion actions, not GA4 key events).

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

Usage Guidelines4/5

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

Explicitly situates the tool in a workflow: attribution_check and validate_tracking diagnose the problem, this 'closes the loop', and confirm_and_apply is required to apply it. It also notes the change applies to future data only. It doesn't differentiate against near siblings like draft_update_custom_conversion_goal, but the when/when-not context is otherwise strong.

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