Skip to main content
Glama
Pauesome

Ads Analytics MCP

by Pauesome

get_tiktok_anomaly_signal

Identify unusual daily performance in TikTok campaigns by applying a rolling-baseline Z-score to metrics like CTR, CPM, CPC, CPA, spend, and conversions.

Instructions

Detects daily anomalies in TikTok campaign performance using the same rolling-baseline Z-score model as get_meta_anomaly_signal. For each campaign × metric (CTR, CPM, CPC, CPA, spend, conversions), evaluates trailing days against a baseline of the prior baseline_days (default 14). Flags any day with |z| ≥ z_threshold (default 2.0). Severity: |z| ≥ 2× threshold = severe, ≥ 1.5× = moderate, otherwise mild. Sorted severity → most-recent → |z|.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsNoSubset of metrics to evaluate.
client_idNoClient identifier.
z_thresholdNoAbsolute Z-score threshold to flag a daily bucket. Default 2.0.
campaign_idsNoFilter to specific campaign IDs.
baseline_daysNoRolling baseline window in days. Default 14.
advertiser_idsNoOverride the client's default advertiser ID.
date_range_endNoYYYY-MM-DD. Defaults to today.
date_range_startNoYYYY-MM-DD. Defaults to baseline_days + 14 days ago.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the algorithm (rolling-baseline Z-score), the defaults (baseline_days=14, z_threshold=2.0), the severity tiering rules, and the result ordering (severity → most-recent → |z|). It omits auth/data-source constraints and any pagination or result-size behavior, so it stops short of a 5.

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?

Four dense sentences, fully front-loaded with purpose first, then model, then mechanics, then ordering. No filler and nothing repeated from structured fields.

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 an 8-param, no-annotation, no-output-schema tool, the description supplies the algorithm, defaults, severity logic, and sort order an agent needs to interpret results. It leaves the returned payload shape and data-source scope unspecified, which is the only meaningful gap.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds genuine derived meaning: severity tiers are computed relative to z_threshold, and date_range_start defaults to baseline_days + 14 days ago, a relationship not visible in the schema. It also enumerates the six evaluated metrics, reinforcing the schema enum.

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 (detects), resource (daily anomalies in TikTok campaign performance), and the model used, and explicitly names the sibling it mirrors (get_meta_anomaly_signal). An agent can distinguish it from get_tiktok_campaign_performance and the meta sibling without opening any schema.

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?

The description positions this as the TikTok counterpart to get_meta_anomaly_signal and describes the evaluation scope (campaign × metric), which implies when it applies. But it never states when to prefer it over get_tiktok_campaign_performance or get_tiktok_hourly_performance, nor any prerequisites.

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