Skip to main content
Glama

AdsAgent — TikTok Ads MCP

Update attribution cohort settings

mmp_save_cohort_config
Destructive

Save one cohort config for a specific app under one MMP connection. WRITE — call is IMMEDIATE; the new config drives the next scheduled cohort pull. kpis should be picked from the app's Sending Events — call mmp_get_state first and inspect each metadata row's event_mappings / mapped_events for valid event names. Typing a kpi that the AF app doesn't send silently returns zero rows. Call only for an explicit user-requested config change; no mutation receipt is advertised. Mirror of Meta MCP mmp_save_cohort_config.

REQUIRED: connection_id (str — UUID from mmp_get_state), app_ref (str — the AF app reference, e.g. "ai.hailuo.video" for Android, "id6741675037" for iOS). Optional config fields (any subset; unset = leave existing value alone): cohort_type, min_cohort_size, selected_source_refs (list[str]), preferred_timezone, preferred_currency, partial_data, aggregation_type, period_filters (list[int]), groupings (list[str]), kpis (list[str]). EXAMPLE: mmp_save_cohort_config({"connection_id": "", "app_ref": "ai.hailuo.video", "kpis": ["ug_new_user_payment"], "selected_source_refs": ["tiktokglobal_int"]})

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kpisNo
app_refYes
groupingsNo
cohort_typeNo
partial_dataNo
connection_idYes
period_filtersNo
min_cohort_sizeNo
aggregation_typeNo
connection_contextNo
preferred_currencyNo
preferred_timezoneNo
selected_source_refsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / connection_context
      Added value: +{
      +  "pattern": "^mctx_v1_[0-9a-f]{64}$",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare the mutation profile (readOnlyHint=false, destructiveHint=true), so the bar is lower, and the description still adds real signal: the write is IMMEDIATE and drives the next scheduled cohort pull, unset fields are left alone, a bad kpi silently returns zero rows, and 'no mutation receipt is advertised.' It stops short of describing what existing settings get overwritten or auth requirements.

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?

Front-loads the WRITE/immediacy warning, then required, then optional, then a concrete example. Sized sensibly for 13 undocumented parameters; only minor redundancy in the user-requested-change / no-receipt sentence pair.

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 destructive 13-param mutation with no output schema, the definition covers prerequisites, partial-update semantics, a silent-failure trap, and a worked example. Gaps remain on the undocumented connection_context parameter and on what a failed or rejected save looks like.

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 0%, so the description carries the burden and only partially compensates: it identifies both required params with UUID/format examples and lists the optional fields with types plus the 'unset = leave existing value alone' default semantics. It gives no meaning for cohort_type, aggregation_type, period_filters, or min_cohort_size, and omits connection_context entirely.

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+resource+scope: 'Save one cohort config for a specific app under one MMP connection.' It is clearly separable from siblings like mmp_get_state (discovery), mmp_fetch_cohorts (read), and mmp_delete_connection.

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

Usage Guidelines5/5

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

Explicit when-to-use ('Call only for an explicit user-requested config change'), prerequisite ordering ('call mmp_get_state first and inspect each metadata row's event_mappings / mapped_events'), and a named alternative for the discovery step. Not left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources