Skip to main content
Glama

audit_roas_anomalies

Detect abnormal ad spend velocity (Z-score) and ROAS/CPA breaches across Meta or Google Ads campaigns, flagging performance anomalies for budget review.

Instructions

Detects abnormal ad spend velocity (Z-Score) and ROAS/CPA breaches for Meta Ads or Google Ads campaigns.

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": {
      "campaignName": "<campaignName>",
      "spend": "<spend>",
      "revenue": "<revenue>",
      "conversions": "<conversions>",
      "historicalSpend": "<historicalSpend>"
    },
    "name": "audit_roas_anomalies"
  }
}

Input Schema

NameRequiredDescriptionDefault
spendYesCurrent period spend in USD
revenueYesAttributed revenue in USD
conversionsYesTotal conversions
campaignNameYesName of the campaign being audited
minRoasFloorNoMinimum acceptable ROAS
historicalSpendYesBaseline spend array

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the detection method (Z-Score over historical spend) and the breach dimensions (ROAS/CPA), which is real behavioral context. It omits whether this is a pure stateless computation or performs writes, and gives no hint about what the result contains, leaving the agent guessing on output shape.

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?

A single dense sentence that front-loads the detection capability and qualifies it with the method and platform scope. There is no filler, no redundancy, and nothing an agent must read past to reach the core purpose.

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 six-parameter, five-required audit tool with no annotations and no output schema, the description explains the inputs' purpose but says nothing about return values — whether it returns boolean flags, a report object, or severity scores. That is a meaningful gap given no output schema exists to compensate.

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 100%, so every parameter is already documented, establishing a baseline of 3. The description adds modest semantic linkage — the Z-Score reference explains why historicalSpend is a baseline array, and 'ROAS/CPA breaches' explains the role of spend/revenue/conversions — but it does not reference minRoasFloor or clarify how CPA is derived in the absence of a dedicated cost parameter.

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 uses a specific verb ('Detects') with a concrete resource: abnormal spend velocity via Z-Score and ROAS/CPA threshold breaches, scoped to Meta Ads or Google Ads campaigns. It does not differentiate from the listed siblings, but those (build_meta_capi_event, calculate_ltv_cac_payback) are functionally distinct enough that the purpose 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 implied by the framing as an audit/anomaly check on ad campaign metrics, and the platform scope (Meta/Google) narrows the domain. However, there is no explicit when-to-use vs when-not-to-use guidance, no prerequisites (e.g., needing a baseline window of historical spend), and no mention of alternatives.

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