Skip to main content
Glama

Trillboards DOOH Advertising

anomaly_detect

Detect anomalies in observation patterns. Alert when metrics deviate significantly from trailing averages.

Computes trailing mean and standard deviation for a given metric from the observation_stream, then identifies observations that fall beyond the configured sigma threshold (z-score based anomaly detection).

WHEN TO USE:

  • Monitoring for unusual audience patterns (sudden spikes or drops in face count)

  • Detecting equipment anomalies (confidence drops indicating sensor issues)

  • Identifying unusual commerce or vehicle patterns

  • Finding outlier moments that may indicate events, incidents, or opportunities

RETURNS:

  • anomalies: Array of anomalous observations with:

    • observation_id, device_id, venue_type, observed_at

    • metric_value: The observed value

    • z_score: How many standard deviations from the mean

    • direction: 'above' or 'below' the mean

    • payload: Full observation payload for context

  • baseline: { mean, stddev, sample_count, lookback_hours }

  • suggested_next_queries: Follow-up queries to investigate anomalies

EXAMPLE: User: "Are there any unusual audience patterns at retail venues?" anomaly_detect({ metric: "face_count", venue_type: "retail", lookback_hours: 24, threshold_sigma: 2.0 })

User: "Detect anomalies in vehicle counts at this screen" anomaly_detect({ metric: "vehicle_count", screen_id: "507f1f77bcf86cd799439011", lookback_hours: 48, threshold_sigma: 2.5 })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricYesThe metric to check for anomalies. Extracted from observation payload (e.g., face_count, vehicle_count, confidence, emotional_engagement, crowd_energy, noise_level)
screen_idNoFilter to a specific screen (mongo ID). Optional.
venue_typeNoFilter to a specific venue type. Optional.
lookback_hoursNoHours of historical data to compute baseline from (default: 24, max: 168)
threshold_sigmaNoNumber of standard deviations to consider anomalous (default: 2.0, range: 1.0-5.0)

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses the algorithmic behavior (trailing mean/stddev, z-score), computes baseline statistics, and describes the return payload. It doesn't explicitly state side-effect safety, but the focus on detection and returns implies a read-only operation.

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?

The description is structured into clear sections (purpose, when to use, returns, examples) and every sentence contributes value. It is longer than average but appropriate given the tool's complexity and the absence of an output schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description fully compensates for missing annotations and missing output schema by detailing return values, providing example invocations, and explaining the detection logic. It is complete enough for an agent to select and invoke the tool correctly.

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 the baseline is 3. The description adds meaningful context beyond the schema by explaining how parameters like metric, lookback_hours, and threshold_sigma interact in examples, but it doesn't provide per-parameter semantics beyond what the schema already offers.

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?

The description uses a specific verb ('Detect anomalies') and clearly identifies the resource ('observation patterns'), making the tool's purpose explicit. It distinguishes from siblings like predictive_query by focusing on statistical outlier detection in observation data.

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?

A dedicated 'WHEN TO USE' section lists concrete scenarios such as monitoring audience patterns and detecting equipment anomalies, providing clear usage context. It does not explicitly name alternative tools or state when not to use this tool, but the context is strong enough to guide selection.

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.

TDQS

B3.3/5.0
Disambiguation2/5

There are exact duplicates (get_task_status/tasks_get, list_tasks/tasks_list) and several overlapping analytics, attribution, and semantic search clusters (get_attention_metrics vs get_creative_attention vs get_social_attention; find_similar_moments vs semantic_search_observations; get_campaign_attribution vs get_multi_touch_attribution vs get_roas). Detailed descriptions help, but with 83 tools an agent will frequently struggle to pick the right one.

Naming Consistency3/5

Most tools follow a snake_case verb_noun pattern (list_devices, create_campaign, delete_webhook), but there are notable inconsistencies: list_* and get_* are used interchangeably for list operations, attention tools mix conventions (get_attention_metrics vs get_creative_attention vs get_social_attention), and the legacy tasks_get/tasks_list names break the established get_task_status/list_tasks pattern.

Tool Count1/5

83 tools is an extreme count for a single MCP server, spanning device management, sensing, campaigns, media buys, attribution, webhooks, billing, API discovery, and AdCP protocol concerns. This is a broad API surface dump rather than a focused tool set, and it would be far better split into several coherent servers.

Completeness2/5

Despite the enormous surface, core campaign lifecycle is incomplete: create_campaign explicitly tells the agent to use update_campaign to activate a campaign, but no update_campaign tool exists, and there are no list/delete campaign tools. Significant capabilities exist for analytics, attribution, and webhooks, but the primary advertising workflow has a dead end.

Resources